-
Notifications
You must be signed in to change notification settings - Fork 37
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
dstep dumps core on a simple header #26
Comments
Hmm, I can not reproduce this, at least not on OS X. Which version of DMD and libclang are you using? Could you please try the precompiled version of DStep as well. |
dmd: DMD64 D Compiler v2.065 When I tried the pre-compiled binary I get: ./dstep: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./dstep) |
I have tried to debug dstep but can't get any info from "gdb dstep core". The "file" command shows embedded symbols and I compiled dstep with: $ dub -d -f build |
Ok, I'll see what I can do. |
I can confirm it on Arch Linux x64
(updated with debug symbols) |
Failed assertion comes from default: assert(0, "Unhandled type kind " ~ kind.toString); |
libclang 3.4.1 , dstep built from tag 0.1.0 |
I've been able to reproduce this on a different computer, probably due to a newer versions of libclang. Seems like they added a couple of new types in later versions. I'll see if I can fix this during the weekend. In the meantime, it will probably work in you downgrade to an older version of libclang. I usually use 3.1. I probably should upgrade, but I haven't done so so far because I don't need any of the newer features and libclang is supposed to be ABI compatible with later versions. |
Ok, I see. In libclang 3.1 the type is defined as |
3.1 is rather old, it makes impossible to use dstep with system package of clang, I guess will need to hotfix it for Arch. btw, there should probably be enforcement here instead of assertion, so that release version still have reasonable error message instead of segfault. |
How about returning |
Up to you, I am just pointing that using assertion for something that actually can happen with clang version change results in no meaningful error messages from reporting user. Unless they are eager to do debug rebuild and use some gdb ;) |
(bump) Any chance of this being fixed? Occurs with clang 3.5 on Ubuntu 14.04 LTS i686 with dstep built from git master. |
Yes, of course. I'll see if I can get it fixed during the weekend. |
I haven't actually fixed this yet (I have worked improving the test infrastructure) but I can only reproduce this with libclang 3.4.x. Version 3.1-3.3 and 3.5.0 seems to be ok. This is on OS X. |
I'll test on Linux and report back. Thanks. |
Works as expected. |
Given a file t.h, with contents:
extern const char *const sys_errlist[];
Run dstep on it and get a core dump:
$ dstep -x c -o t.d t.c
Segmentation fault (core dumped)
I built dtep from this repo on a Debian Linux 64-bit system (after building and installing the dmd suite from its repos).
The text was updated successfully, but these errors were encountered: