Created attachment 1800
source and binaries to reproduce
full source with binaries is attached.
one of them depends on an external C library (i am working on the bindings), and a prebuilt version is attached, and below are links to the source with build instructions (very few dependencies, just OpenGL and X11, just a simple makefile).
source of packages:
- bindings: https://github.com/xdrie/re-raylib-d
- original library (tagged version): https://github.com/xdrie/raylib/releases/tag/v3.0.0_patch_1
this is the code in `app.d` that causes a segmentation fault on the last line of main.
```
import raylib;
void main() {
auto transform_mat = raymath.MatrixIdentity();
auto top_left = Vector3(1, 1, 0);
top_left = raymath.Vector3Transform(top_left, transform_mat);
}
```
on the last line, if we assign to a variable, like:
`auto f = raymath.Vector3Transform(top_left, transform_mat);`
then it no longer segfaults.
dmd generates a segfaulting binary; both ldc and gdc generate binaries that work as expected.
this is why i think this is very likely a dmd bug.
Comment #1 by bugzilla — 2020-08-09T01:45:54Z
Can you see if a smaller test case can be made?
Comment #2 by robert.schadek — 2024-12-13T19:10:20Z