Comments (6)
Okay, this turned out to be my own fault. In llvm/llvm-project@6255157d24e2 I turned on trivial std::pair
copy constructors for FreeBSD >= 14. Which was a bad idea, in hindsight, because the ABI changes. The idea at the time was to bump the libc++ version to be able to break the ABI, but we never got to that.
Long story short, because of the mismatch a libLLVMnn.so
compiled against a "new ABI" libc++ tends to crash in interesting ways, when you use it from a precompiled ldc2
executable, that was originally compiled against the "old ABI" libc++.
In DimitryAndric/freebsd-src@4c0e8f6 I reverted that, rebuilt the FreeBSD world and ports, and now lang/ldc
builds just fine, at least without any crashes! I haven't extensively tested the resulting ldmd2
and ldc2
, but if they are able to build the D runtime, I assume they are OK.
from ldc.
ping @alonsobsd who is maintainer of the lang/ldc port.
from ldc.
Thx for the report. AFAICT, the relevant code (in master, but shouldn't have changed significantly since v1.35) looks as harmless as it gets wrt. inserting some pointers into a stack-allocated and default-initialized llvm::SmallSet<llvm::Use *, 16> Visited
. We have been using v15.0.7 as primary LLVM version for a while (incl. extensive CI coverage), but I've never seen any issues when building the little ldc-build-runtime
tool.
from ldc.
Oh and our current FreeBSD CI does use the LLVM v15.0.7 port too, and its clang as C++ host compiler: https://cirrus-ci.com/task/5161765764333568
from ldc.
Yeah, the mystery here is that the devel/llvm15
port, when compiled by clang 17.0.6, does seem to work, whereas if the devel/llvm15
port is compiled by clang 18, it does not.... I just built a ldc2 binary with debug info on a FreeBSD 15-CURRENT machine with clang 17.0.6 and copied it over the the FreeBSD machine with a clang-18 compiled libLLVM15.so, and for some reason it is now allocating ~25 GiB of data in the "SmallPtrSet". :)
I'm thinking that some sort of optimization has messed up the assumptions under which such SmallPtrSets can be used, but I can't see the problem with other ports that use llvm15, so I'm still not sure whether the problem is in GarbageCollect2Stack, in llvm15, or in clang18...
from ldc.
Oh wild. I'd make sure that the same clang that was used to compile libLLVM is used as C++ host compiler for LDC too.
from ldc.
Related Issues (20)
- ARM/AArch64 cross-compilation targets aren't respected in an MSVC environment on Windows. HOT 2
- Cross-compilation targets aren't respected when preprocessing C files with `clang-cl` (on Windows). HOT 1
- LDC sets both never-inline and always-inline on inline functions containing DMD-style inline assembly. HOT 3
- Assertion failure when a struct contains a struct which contains bit fields spanning [17, 25) or [33, 57) bits. HOT 2
- Bad codegen for comparison with postfix HOT 5
- ld: Assertion failed: (0 && "lto symbol should not be in layout"), function symbolForAtom, file Layout.cpp, line 1381. HOT 3
- LDC bug (regression) in 1.37.0 when attempting to use std.net.curl.HTTP.responseHeaders HOT 3
- `--x86-asm-syntax=intel` option not documented HOT 2
- Memory sanitizer doesn't appear to be compiled with -fPIC on linux HOT 1
- LDC 1.38.0 crash on default parameter with `new` HOT 2
- WebAssembly: doesn't support emscripten data layout HOT 1
- lit test broken for Python >= 3.12 HOT 2
- core.stdc.stdlib.d is missing some type definitions for wasm32-unknown-unknown-wasm target HOT 5
- Memory leak in rt.minfo according to ASAN HOT 3
- Time trace large amounts of time spent in writing of files HOT 8
- stat_t has wrong size for Android armv7a HOT 2
- Struct with constructor in member returned using pointer on Windows x64 HOT 1
- Segmentation fault: ldc2 compiled tinyscheme-1.42 (DMD works fine) HOT 1
- No error when using params in @naked functions HOT 4
- Shadowed static assert error in the compiler output HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldc.