Page MenuHomeFreeBSD

libcxxrt: Fix diagnostics for derived classes
ClosedPublic

Authored by emaste on Jun 24 2026, 3:23 PM.
Tags
None
Referenced Files
F166315837: D57822.id180552.diff
Wed, Aug 12, 8:50 PM
Unknown Object (File)
Tue, Aug 11, 11:52 PM
Unknown Object (File)
Mon, Aug 10, 10:13 AM
Unknown Object (File)
Mon, Aug 10, 9:40 AM
Unknown Object (File)
Mon, Aug 10, 4:44 AM
Unknown Object (File)
Sun, Aug 9, 7:05 PM
Unknown Object (File)
Sat, Aug 8, 7:40 PM
Unknown Object (File)
Sat, Aug 8, 2:57 PM
Subscribers

Details

Summary
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed.  The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".
Now e->what() will actually be included in the output, e.g. "Terminating
due to uncaught exception 0x2bba49208000 'Model file doesn't exist' of
type std::runtime_error".

Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation

Also to be upstreamed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.

Hm, I remember something similar occurring when I was attempting to debug that std::ios ABI issue. This would also throw some exceptions during initialization, and it resulted in strange messages from libcxxrt. I didn't have the time then to investigate, but it could very well have been this issue.!

This revision is now accepted and ready to land.Jun 24 2026, 5:01 PM
This revision was automatically updated to reflect the committed changes.

Please can you submit this upstream as well?