[Issue 22737] Segmentation fault in CppMangleVisitor.getTiNamespace

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 10 04:02:32 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22737

Mathias LANG <pro.mathias.lang at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pro.mathias.lang at gmail.com

--- Comment #2 from Mathias LANG <pro.mathias.lang at gmail.com> ---
I see where the issue is. I'm wondering whether this should be rejected by the
frontend or not. Essentially we just "see through" the `Identity` template.
However, I don't think that's possible in C++. There might also be some other
expectations (what if `Identity` has an `extern(C++)` and namespace
declaration?).

Note:
We hit `headOfType`:
https://github.com/dlang/dmd/blob/cefa9ff9d0d68ca21049ffc2d6f08dd1d8c7843c/src/dmd/cppmangle.d#L1376-L1395
with our `res` as `int`, and a few places don't account for types not having
Dsymbol.

--


More information about the Digitalmars-d-bugs mailing list