Page MenuHomeFreeBSD

libcxxrt: Fix diagnostics for derived classes
ClosedPublic

Authored by emaste on Jun 24 2026, 3:23 PM.
Tags
None
Referenced Files
F171123611: D57822.id180539.diff
Tue, Sep 8, 8:43 PM
F171107052: D57822.id180552.diff
Tue, Sep 8, 6:03 PM
F171096435: D57822.diff
Tue, Sep 8, 4:35 PM
Unknown Object (File)
Sun, Sep 6, 8:25 PM
Unknown Object (File)
Sun, Sep 6, 3:18 PM
Unknown Object (File)
Sun, Sep 6, 2:03 PM
Unknown Object (File)
Sun, Sep 6, 9:25 AM
Unknown Object (File)
Sun, Sep 6, 8:41 AM
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?