This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Correct GetTls for x32
ClosedPublic

Authored by hjl.tools on May 5 2022, 10:46 AM.

Details

Summary

Since x32 pointer size is 4 bytes, the self pointer offset in TCB:

struct
{
  void *tcb;
  dtv_t *dtv;
  void *self;
  ...

should be 8, not 16.

Fixes https://github.com/llvm/llvm-project/issues/55288

Diff Detail

Event Timeline

hjl.tools created this revision.May 5 2022, 10:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 10:46 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
hjl.tools requested review of this revision.May 5 2022, 10:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 10:46 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
eugenis accepted this revision.May 5 2022, 1:24 PM

LGTM

This revision is now accepted and ready to land.May 5 2022, 1:24 PM
This revision was landed with ongoing or failed builds.May 5 2022, 1:56 PM
This revision was automatically updated to reflect the committed changes.