-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
GC range detection not implemented on FreeBSD (druntime fails to build) #451
Comments
Probably, yes. You could try copying that definition over. If you are suddenly getting weird crashes in the test suite, then you know it wasn't it. ;) Edit: I haven't had a closer look at the *BSDs at all yet, but I think In case I magically have a chunk of free time at some point to look into this, what would be a good place/VirtualBox image to start from? |
(updated comment) |
The piece of code above does not work. As first work around I simply copied the Linux version ( |
BTW: I downloaded the DVD image from ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/9.1/ and installed FreeBSD from it. After that I had to add some ports:
Then I was able to checkout ldc and compile it. |
As for the linking errors, the FreeBSD sys directory probably needs to be added to CMake. |
Oh, and thanks for the getting started info, it might come handy at some point (though I should probably fix OS X 10.8 first…). |
FreeBSD crashes with the simple implementation. :-) The pull request with the added freebsd files is running now on Travis. |
I guess we could try to bring back the old |
I created a Druntime pull request (dlang/druntime#586) to add missing header files. With these headers, the Linux solution to find the TLS section compiles. |
How can I reproduce the crash? I have copied the Linux code for initTLSRanges, initSections, and the supporting elf methods and run a Hello-World and not had a crash. I will try a more complex program and see. I haven't had a response in the mailing lists so I am going to try the FreeBSD forums. |
For druntime - druntime_src_core_thread_release_run is the only test that fails with seg fault. Doing a debug build to try and get a gdb backtrace. |
I did exactly what you did: copy the linux code for finding the TLS start address. |
I committed a possible solution. Could you please try it? It's enough to pull the latest druntime commit. |
I've build the latest head and run tests but the following failures occur: 12 - druntime_src_core_thread_release_run (SEGFAULT) |
I currently recheck - the test suite is still running. So far I don't get a failure. Especially I do not see the
in your build folder to compile the test and check the output? |
failed with an eror about -lcurl
succeeded. |
What gcc and llvm version do you use? With gcc 4.2.1 and LLVM 3.1 I get:
That's all. Other unit tests seem to work. BTW: How can I update gcc? The fault in |
With clang 3.0, the compiler faults are gone. I think I compile a more recent clang/LLVM version myself to verify it. |
I used llvm33 and clang33. I don't believe you can update the system compiler. druntime_src_core_thread_release_run SEGFAULT occurs intermittently. When I run the test 7 times out of 10 it fails with the segfault. I'll add some debug and try again. |
I compiled ldc with clang 3.3 and LLVM 3.3 (git checkout). The tests are still running but there is no failure in |
You're right I've upgraded llvm & clang to 3.3.1 and no failure in core.thread. |
I spoke too soon.
I built with
|
That's funny. After I installed clang & LLVM 3.3, only the runtime errors in |
I've tried this on two PC-BSD 9.2 machines (server only so very minimal) and it consistently fails. I am going to try a vanilla FreeBSD 9.2 install to see if that works. Are you able to try a PC-BSD install and see if |
I try. They provide a VirtualBox image - that should be easy going. |
I installed PC-BSD 9.2 (amd64) (Desktop, customized with VCS). I only added llvm-3.3, cmake-2.8 and libconfig. I build LDC with clang 3.3 (I set CC and CXX.) |
I' now baffled. After running the tests several times, I get reproducable:
I have no glue why the behaviour has changed. I ran the test suite at least 3 times without getting the segfault in `core.thread' but now it's there... |
|
Pretty much the same results. ldc itself is segfaulting when compiling but I'll raise another issue when I find the offending code. |
@sumo The offending test in |
If its not GC related close this issue and open a new one if you prefer. |
@sumo Do you have the same test failures? If yes then I would close this issue and open a new one. |
I do have the same test failures. Thanks BTW, very informative seeing you at work. |
Very informative to see whom at what work? ;) |
FreeBSD xxx 9.1-RELEASE-p17 FreeBSD 9.1-RELEASE-p17
ldc/runtime/druntime/src/rt/sections_ldc.d(301): Error: static assert "TLS range detection not implemented for this OS."
*** [runtime/src/core/thread.o] Error code 1
Wild guess but could this, for FreeBSD, be :
void[] initTLSRanges()
{
auto pbeg = cast(void_)&tlsstart;
auto pend = cast(void)&_tlsend;
return pbeg[0 .. pend - pbeg];
}
as defined in rt/sections_freebsd.d?
The text was updated successfully, but these errors were encountered: