Page MenuHomePhabricator

[libc++] Fix segmentation fault in __do_put_integral

Authored by MarcoFalke on Nov 10 2021, 11:51 AM.



6 chars are not sufficient to represent all formats for 64 bit integers.

This was accidentally introduced in commit b889cbf36635a302f5b77560f1769178f196c2c7 (

This causes failures in downstream projects, for example:

Diff Detail

Event Timeline

MarcoFalke requested review of this revision.Nov 10 2021, 11:51 AM
MarcoFalke created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptNov 10 2021, 11:51 AM

Can we add a regression test in libcxx/test/std/ for this?

There are tests, but the issue (segmentation fault) is only observable on 32-bit AFAICT. On other platforms it is "only" UB, but doing the right thing.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 10 2021, 12:26 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

Thanks for fixing this.