Skip to content

x/sys: missing rcx in clobber list for gccgoXgetbv #53302

Closed

Description

@tianxiaogu

The inline assembly in gccgoXgetbv (https://cs.opensource.google/go/x/sys/+/master:cpu/cpu_gccgo_x86.c;l=40) modifies rcx but forgets to add rcx to the clobber list. We have encountered a crash when building an application with GOLLVM (and setting CC to clang-11.

void
gccgoXgetbv(uint32_t *eax, uint32_t *edx)
{
	__asm("  xorl %%ecx, %%ecx\n"
	      "  xgetbv"
	    : "=a"(*eax), "=d"(*edx));
}

Activity

  1. modified the milestones: Unreleased, Gccgo on Jun 9, 2022
  2. cherrymui commented on Jun 9, 2022

    @cherrymui
    Member
  3. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Jun 9, 2022
  4. gopherbot commented on Jun 10, 2022

    @gopherbot
    Contributor

    Change https://go.dev/cl/411635 mentions this issue: cpu: use xgetbv intrinsic

  5. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    and removed
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Jun 10, 2022
  6. locked and limited conversation to collaborators on Jun 10, 2023
  7. added a commit that references this issue on Jun 7, 2024
    9f5ed59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions