Skip to content

[Regions] Avoid using allocation_started for USE_REGIONS #2483

Closed

Description

@cshung

When USE_REGIONS is enabled, we don't have the field allocation_started defined on the generation class.

class generation
{
public:
    // Don't move these first two fields without adjusting the references
    // from the __asm in jitinterface.cpp.
    alloc_context   allocation_context;
    PTR_heap_segment start_segment;
#ifndef USE_REGIONS
    uint8_t*        allocation_start;
#endif //!USE_REGIONS
...
}

Sadly, it is still defined on DacpGenerationData as the struct cannot be changed. After dotnet/runtime#56796 is merged, the field should always be 0.

Any code that depends on the value is wrong if the debuggee is run with USE_REGIONS enabled. Therefore we need to review all usage and see what we can do to fix them.

Activity

  1. added
    bug
    on Aug 5, 2021
  2. added this to the 6.0.0 milestone on Aug 11, 2021
  3. modified the milestones: 6.0.0, 7.0.0 on Nov 8, 2021
  4. modified the milestones: 7.0.0, Future on Jun 6, 2022
  5. assigned and unassigned on Mar 10, 2023
  6. leculver commented on Apr 7, 2023

    @leculver
    Contributor

    I'm closing this one as completed. All code within SOS and ClrMD only use allocation_start when dealing with segments (i.e. !defined(USE_REGIONS)). There's still a little code left in C++ SOS which has some GC logic, but that all will be removed when I'm done with my current work, but as of a few checkins ago we no longer incorrectly use allocation_start.

  7. ghost locked as resolved and limited conversation to collaborators on Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsos

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions