This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] Increase the external value of _LIBUNWIND_CURSOR_SIZE for SEH/x86_64
ClosedPublic

Authored by mstorsjo on Apr 5 2023, 9:56 AM.

Details

Summary

For x86_64 Windows targets (that use SEH), _LIBUNWIND_CURSOR_SIZE
is 204; this fixes corruption in test cases that include libunwind.h
without manually defining _LIBUNWIND_IS_NATIVE_ONLY.

If the libunwind.h header is included without defining
_LIBUNWIND_IS_NATIVE_ONLY (like in the libunwind test cases), the
sizes are set to accommodate the maximum possible cursors and
contexts.

(Alternatively, __libunwind_config.h should be changed to default
to native unwinding unless cross unwinding has been requested.
Cross unwinding isn't implemented as far as I know anyway.)

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 5 2023, 9:56 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 5 2023, 9:56 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a subscriber: pengfei. · View Herald Transcript
mstorsjo requested review of this revision.Apr 5 2023, 9:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 9:56 AM
cdavis5x accepted this revision.Apr 6 2023, 1:30 PM
phosek accepted this revision.Apr 8 2023, 2:48 PM
phosek added a subscriber: phosek.

LGTM

This revision is now accepted and ready to land.Apr 8 2023, 2:48 PM
This revision was landed with ongoing or failed builds.Apr 10 2023, 2:03 PM
This revision was automatically updated to reflect the committed changes.