Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on C++ errors #2

Closed
maleadt opened this issue May 30, 2024 · 1 comment
Closed

Segfault on C++ errors #2

maleadt opened this issue May 30, 2024 · 1 comment

Comments

@maleadt
Copy link

maleadt commented May 30, 2024

With the error in #1, CppInterop simply segfaults when it fails:

julia> Cpp.Declare("""
       #include <iostream>
       #include <vector>
       """)
In file included from <<< inputs >>>:1:
In file included from input_line_2:1:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/iostream:41:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/ostream:40:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/ios:40:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/iosfwd:42:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/bits/postypes.h:40:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/cwchar:44:
/usr/include/wchar.h:35:10: fatal error: 'stddef.h' file not found
   35 | #include <stddef.h>
      |          ^~~~~~~~~~

[8190] signal 11 (1): Segmentation fault
in expression starting at REPL[6]:1
_ZN5clang4Decl22getTranslationUnitDeclEv at /home/tim/.julia/artifacts/69dcbef0a6538dfad50207efd8520cb42b8b945d/lib/libclang-cpp.so (unknown line)
Allocations: 3068679 (Pool: 3067893; Big: 786); GC: 4
@Gnimuc
Copy link
Owner

Gnimuc commented Jun 7, 2024

This is fixed in the upstream, see compiler-research/CppInterOp#306 (comment)

@Gnimuc Gnimuc closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants