Giter Site home page Giter Site logo

Comments (17)

jacob-carlborg avatar jacob-carlborg commented on July 21, 2024

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.

from dstep.

tbrowder avatar tbrowder commented on July 21, 2024

dmd: DMD64 D Compiler v2.065
libclang: clang version 3.5 (trunk 195954)

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)

from dstep.

tbrowder avatar tbrowder commented on July 21, 2024

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

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 21, 2024

Ok, I'll see what I can do.

from dstep.

mihails-strasuns avatar mihails-strasuns commented on July 21, 2024

I can confirm it on Arch Linux x64

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000005ae3cc in rt.deh_win64_posix.terminate() ()
(gdb) bt
#0  0x00000000005ae3cc in rt.deh_win64_posix.terminate() ()
#1  0x000000000059b515 in _d_throwc ()
#2  0x00000000005ad804 in onAssertErrorMsg ()
#3  0x00000000005975d5 in _d_assert_msg ()
#4  0x0000000000518845 in _D5dstep10translator4Type13translateTypeFE5clang1c5index10CXTypeKindbZAya (rewriteIdToObject=true, kind=<incomplete type>) at dstep/translator/Type.d:302
#5  0x0000000000517bc0 in _D5dstep10translator4Type13translateTypeFS5clang4Type4TypebbZAya (applyConst=true, rewriteIdToObject=true, type=...) at dstep/translator/Type.d:62
#6  0x000000000057fc75 in _D5dstep10translator10Translator10Translator8variableMFS5clang6Cursor6CursorC5dstep10translator6Output6StringZAya (this=0x7f8affb99a00, context=0x7f8affb9cb40, cursor=...) at dstep/translator/Type.d:19
#7  0x000000000057f8eb in _D5dstep10translator10Translator10Translator9translateMFS5clang6Cursor6CursorS5clang6Cursor6CursorZAya (this=0x7f8affb99a00, parent=..., cursor=...) at dstep/translator/Translator.d:124
#8  0x000000000057f420 in _D5dstep10translator10Translator10Translator9translateMFZv14__foreachbody1MFKS5clang6Cursor6CursorKS5clang6Cursor6CursorZi (this=0x7fff21ea14d8, __applyArg1=<error reading variable>, 
    __applyArg0=<error reading variable>) at dstep/translator/Translator.d:68
#9  0x000000000051ea6f in _D5clang7Visitor18DeclarationVisitor7opApplyMFDFKS5clang6Cursor6CursorKS5clang6Cursor6CursorZiZi14__foreachbody2MFKS5clang6Cursor6CursorKS5clang6Cursor6CursorZi (this=0x7fff21ea1430, 
    __applyArg1=<error reading variable>, __applyArg0=<error reading variable>) at clang/Visitor.d:93
#10 0x000000000051e886 in _D5clang7Visitor7Visitor15visitorFunctionUS5clang1c5index8CXCursorS5clang1c5index8CXCursorPvZE5clang1c5index18CXChildVisitResult (cursor=..., parent=..., data=0x7fff21ea13b8) at clang/Visitor.d:47
#11 0x00007f8afedaf044 in ?? () from /usr/lib/libclang.so
#12 0x00007f8afedb2059 in ?? () from /usr/lib/libclang.so
#13 0x00007f8afedaee24 in ?? () from /usr/lib/libclang.so
#14 0x00007f8afedb6754 in clang_visitChildren () from /usr/lib/libclang.so
#15 0x000000000051e82e in _D5clang7Visitor7Visitor7opApplyMFDFKS5clang6Cursor6CursorKS5clang6Cursor6CursorZiZi (this=0x7fff21ea1490, dg=...) at clang/Visitor.d:32
#16 0x000000000051e9f7 in _D5clang7Visitor18DeclarationVisitor7opApplyMFDFKS5clang6Cursor6CursorKS5clang6Cursor6CursorZiZi (this=0x7fff21ea1490, dg=...) at clang/Visitor.d:91
#17 0x000000000057f2a2 in _D5dstep10translator10Translator10Translator9translateMFZv (this=0x7f8affb99a00) at dstep/translator/Translator.d:62
#18 0x000000000054ff44 in _D5dstep6driver11Application11Application15startConversionMFAyaZv (this=0x7f8affb99d00, file=...) at dstep/driver/Application.d:102
#19 0x000000000054fa4a in _D5dstep6driver11Application11Application3runMFZv (this=0x7f8affb99d00) at dstep/driver/Application.d:50
#20 0x000000000054e517 in _D6dstack11application11Application11Application10debugStartMFZi (this=0x7f8affb99d00) at dstack/dstack/application/Application.d:128
#21 0x000000000054e485 in _D6dstack11application11Application11Application6_startMFZi (this=0x7f8affb99d00) at dstack/dstack/application/Application.d:100
#22 0x000000000054e601 in _D6dstack11application11Application11Application51__T5startTC5dstep6driver11Application11ApplicationZ5startFAAyaZi (args=...) at dstack/dstack/application/Application.d:35
#23 0x0000000000512677 in _Dmain (args=...) at dstep/driver/DStep.d:15
#24 0x000000000059b7ec in rt.dmain2._d_run_main() ()
#25 0x000000000059b746 in rt.dmain2._d_run_main() ()
#26 0x000000000059b7ac in rt.dmain2._d_run_main() ()
#27 0x000000000059b746 in rt.dmain2._d_run_main() ()
#28 0x000000000059b6c7 in _d_run_main ()
#29 0x0000000000512b35 in main ()

(updated with debug symbols)

from dstep.

mihails-strasuns avatar mihails-strasuns commented on July 21, 2024

Failed assertion comes from translateType():

    default: assert(0, "Unhandled type kind " ~ kind.toString);

from dstep.

mihails-strasuns avatar mihails-strasuns commented on July 21, 2024

libclang 3.4.1 , dstep built from tag 0.1.0

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 21, 2024

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.

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 21, 2024

Ok, I see. In libclang 3.1 the type is defined as CXType_Unexposed. Seems they opened up some more types in later versions.

from dstep.

mihails-strasuns avatar mihails-strasuns commented on July 21, 2024

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

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.

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 21, 2024

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 "<unimplemented>", as is already done by other types that are not handled, and in debug mode have an assertion?

from dstep.

mihails-strasuns avatar mihails-strasuns commented on July 21, 2024

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 ;)

from dstep.

rlonstein avatar rlonstein commented on July 21, 2024

(bump)

Any chance of this being fixed?

Occurs with clang 3.5 on Ubuntu 14.04 LTS i686 with dstep built from git master.

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 21, 2024

Yes, of course. I'll see if I can get it fixed during the weekend.

from dstep.

jacob-carlborg avatar jacob-carlborg commented on July 21, 2024

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.

from dstep.

rlonstein avatar rlonstein commented on July 21, 2024

I'll test on Linux and report back. Thanks.

from dstep.

rlonstein avatar rlonstein commented on July 21, 2024

Works as expected.

from dstep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.