This is an archive of the discontinued LLVM Phabricator instance.

Fix std::fpos pretty printer on musl
ClosedPublic

Authored by ccross on Aug 30 2022, 4:26 PM.

Details

Reviewers
pirama
ldionne
Group Reviewers
Restricted Project
Commits
rG13c6828bedeb: Fix std::fpos pretty printer on musl
Summary

The mbstate_t field in std::fpos is an opaque type provied by libc,
and musl's implementation does not match the one used by glibc.
Change StdFposPrinter to verify its assumptions about the layout
of mbstate_t, and leave out the state printing if it doesn't match.

Diff Detail

Event Timeline

ccross created this revision.Aug 30 2022, 4:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2022, 4:26 PM
Herald added a subscriber: arichardson. · View Herald Transcript
ccross requested review of this revision.Aug 30 2022, 4:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2022, 4:26 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
enh added a subscriber: enh.Sep 7 2022, 12:24 PM
enh added inline comments.
libcxx/utils/gdb/libcxx/printers.py
767

accidentally introduced tabs?

ccross added inline comments.Sep 7 2022, 12:36 PM
libcxx/utils/gdb/libcxx/printers.py
767

I'm not seeing any tabs in my local git CL, in the download raw diff here, or in the "show raw file (right)" output. I think that must be how phabricator highlights increased indentation?

ldionne accepted this revision.Sep 7 2022, 12:54 PM
ldionne added a subscriber: ldionne.
ldionne added inline comments.
libcxx/utils/gdb/libcxx/printers.py
767

Tabs should be caught by our CI if introduced. Since it's green, I think it's all good.

This revision is now accepted and ready to land.Sep 7 2022, 12:54 PM
This revision was automatically updated to reflect the committed changes.