Re: [lldb-dev] Stackoverflow crash when evaluating an invalid expression

2019-12-09 Thread Raphael “Teemperor” Isemann via lldb-dev
I don’t think we ever received a reproducer for this that would allow us to 
investigate this (or write a fix).

- Raphael

> On 8. Dec 2019, at 23:02, Vadim Chugunov via lldb-dev 
>  wrote:
> 
> Looks like I am hitting the same issue.  Was there a fix checked in for this?
> 
> On Thu, Mar 7, 2019 at 3:05 PM Raphael Isemann via lldb-dev 
> mailto:lldb-dev@lists.llvm.org>> wrote:
> You can also dump() the AST to a file on disk if that is easier to
> capture than stderr. See the overload of `dump()` that takes a stream:
> https://clang.llvm.org/doxygen/ASTDumper_8cpp_source.html#l00225 
> 
> 
> - Raphael
> 
> Am Do., 7. März 2019 um 19:20 Uhr schrieb Ben Ruthig  >:
> >
> > Hey Raphael,
> >
> > Yes, you did advise me to drop a D->dumpColor() call in to 
> > getASTRecordLayout().  For frustrating reasons I still haven't been able to 
> > capture those logs but when I do I will report back.
> >
> > Thanks so much for your help and quick response!
> >
> > Ben
> >
> > On Thu, Mar 7, 2019 at 12:56 PM Raphael Isemann  > > wrote:
> >>
> >> Hi Ben,
> >>
> >> I think I already answered this last week:
> >> http://lists.llvm.org/pipermail/lldb-dev/2019-February/014789.html 
> >> 
> >>
> >> I don't think you'll get an answer here without posting the
> >> problematic source or giving any more information as I described in my
> >> mail.
> >>
> >> Cheers,
> >> - Raphael
> >>
> >> Am Do., 7. März 2019 um 18:13 Uhr schrieb Ben Ruthig via lldb-dev
> >> mailto:lldb-dev@lists.llvm.org>>:
> >> >
> >> > Hello all,
> >> >
> >> > I am currently investigating an issue where LLDB is crashing due to a 
> >> > stack overflow when attempting to evaluate an expression.  I have seen 
> >> > the same issue in 6.0.1 and have reproduced it in 7.0.1.  Any help to 
> >> > diagnose and fix would be greatly appreciated as I am trying to meet a 
> >> > release deadline early next week!
> >> >
> >> > The facts:
> >> > - The expression being evaluated is not a valid expression in the C++ 
> >> > domain. For example the expression is a datatype like 'Foobar'.  (For 
> >> > reasons unexplained I am constrained to supporting this use case.)
> >> > - The crash occurs when using the C++ LLDB API but not when trying to 
> >> > evaluate the expression via the LLDB shell or the LLDB Python script 
> >> > shell.  However, when doing 'expr Foobar' there is no output and the 
> >> > operation is completely silent.  It is similar when trying to do 
> >> > 'lldb.frame.EvaluateExpression("Foobar")' in the Python shell as well.  
> >> > I would expect to get some error output or an SbValue in an error state 
> >> > but no such luck.
> >> > - I was able to capture a stack trace (attached) and it seems to be a 
> >> > recursive loop bottoming out.  For brevity two 'loops' of stacktrace are 
> >> > included here:
> >> >
> >> > 3387.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> >> > clang::RecordDecl * D) Line 2965C++
> >> > 3388.  liblldb.dll!`anonymous 
> >> > namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216
> >> > C++
> >> > 3389.  liblldb.dll!`anonymous 
> >> > namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext 
> >> > & Context, const clang::CXXRecordDecl * Class) Line 172C++
> >> > 3390.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> >> > clang::RecordDecl * D) Line 2965C++
> >> > 3391.  liblldb.dll!`anonymous 
> >> > namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216
> >> > C++
> >> > 3392.  liblldb.dll!`anonymous 
> >> > namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext 
> >> > & Context, const clang::CXXRecordDecl * Class) Line 172C++
> >> > 3393.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> >> > clang::RecordDecl * D) Line 2965C++
> >> >
> >> > Help please :S
> >> >
> >> > Thanks,
> >> > Ben
> >> >
> >> >
> >> > ___
> >> > lldb-dev mailing list
> >> > lldb-dev@lists.llvm.org 
> >> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
> >> > 
> >
> >
> >
> > --
> > "Sometimes I've believed as many as six impossible things before breakfast" 
> > - Alice in Wonderland
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org 
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
> 
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

___
lldb-dev mailing list
lldb-dev@lists.l

Re: [lldb-dev] Stackoverflow crash when evaluating an invalid expression

2019-12-08 Thread Vadim Chugunov via lldb-dev
Looks like I am hitting the same issue.  Was there a fix checked in for
this?

On Thu, Mar 7, 2019 at 3:05 PM Raphael Isemann via lldb-dev <
lldb-dev@lists.llvm.org> wrote:

> You can also dump() the AST to a file on disk if that is easier to
> capture than stderr. See the overload of `dump()` that takes a stream:
> https://clang.llvm.org/doxygen/ASTDumper_8cpp_source.html#l00225
>
> - Raphael
>
> Am Do., 7. März 2019 um 19:20 Uhr schrieb Ben Ruthig :
> >
> > Hey Raphael,
> >
> > Yes, you did advise me to drop a D->dumpColor() call in to
> getASTRecordLayout().  For frustrating reasons I still haven't been able to
> capture those logs but when I do I will report back.
> >
> > Thanks so much for your help and quick response!
> >
> > Ben
> >
> > On Thu, Mar 7, 2019 at 12:56 PM Raphael Isemann 
> wrote:
> >>
> >> Hi Ben,
> >>
> >> I think I already answered this last week:
> >> http://lists.llvm.org/pipermail/lldb-dev/2019-February/014789.html
> >>
> >> I don't think you'll get an answer here without posting the
> >> problematic source or giving any more information as I described in my
> >> mail.
> >>
> >> Cheers,
> >> - Raphael
> >>
> >> Am Do., 7. März 2019 um 18:13 Uhr schrieb Ben Ruthig via lldb-dev
> >> :
> >> >
> >> > Hello all,
> >> >
> >> > I am currently investigating an issue where LLDB is crashing due to a
> stack overflow when attempting to evaluate an expression.  I have seen the
> same issue in 6.0.1 and have reproduced it in 7.0.1.  Any help to diagnose
> and fix would be greatly appreciated as I am trying to meet a release
> deadline early next week!
> >> >
> >> > The facts:
> >> > - The expression being evaluated is not a valid expression in the C++
> domain. For example the expression is a datatype like 'Foobar'.  (For
> reasons unexplained I am constrained to supporting this use case.)
> >> > - The crash occurs when using the C++ LLDB API but not when trying to
> evaluate the expression via the LLDB shell or the LLDB Python script
> shell.  However, when doing 'expr Foobar' there is no output and the
> operation is completely silent.  It is similar when trying to do
> 'lldb.frame.EvaluateExpression("Foobar")' in the Python shell as well.  I
> would expect to get some error output or an SbValue in an error state but
> no such luck.
> >> > - I was able to capture a stack trace (attached) and it seems to be a
> recursive loop bottoming out.  For brevity two 'loops' of stacktrace are
> included here:
> >> >
> >> > 3387.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
> clang::RecordDecl * D) Line 2965C++
> >> > 3388.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> >> > 3389.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext &
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> >> > 3390.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
> clang::RecordDecl * D) Line 2965C++
> >> > 3391.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> >> > 3392.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext &
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> >> > 3393.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
> clang::RecordDecl * D) Line 2965C++
> >> >
> >> > Help please :S
> >> >
> >> > Thanks,
> >> > Ben
> >> >
> >> >
> >> > ___
> >> > lldb-dev mailing list
> >> > lldb-dev@lists.llvm.org
> >> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> >
> >
> >
> > --
> > "Sometimes I've believed as many as six impossible things before
> breakfast" - Alice in Wonderland
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Stackoverflow crash when evaluating an invalid expression

2019-03-07 Thread Raphael Isemann via lldb-dev
You can also dump() the AST to a file on disk if that is easier to
capture than stderr. See the overload of `dump()` that takes a stream:
https://clang.llvm.org/doxygen/ASTDumper_8cpp_source.html#l00225

- Raphael

Am Do., 7. März 2019 um 19:20 Uhr schrieb Ben Ruthig :
>
> Hey Raphael,
>
> Yes, you did advise me to drop a D->dumpColor() call in to 
> getASTRecordLayout().  For frustrating reasons I still haven't been able to 
> capture those logs but when I do I will report back.
>
> Thanks so much for your help and quick response!
>
> Ben
>
> On Thu, Mar 7, 2019 at 12:56 PM Raphael Isemann  wrote:
>>
>> Hi Ben,
>>
>> I think I already answered this last week:
>> http://lists.llvm.org/pipermail/lldb-dev/2019-February/014789.html
>>
>> I don't think you'll get an answer here without posting the
>> problematic source or giving any more information as I described in my
>> mail.
>>
>> Cheers,
>> - Raphael
>>
>> Am Do., 7. März 2019 um 18:13 Uhr schrieb Ben Ruthig via lldb-dev
>> :
>> >
>> > Hello all,
>> >
>> > I am currently investigating an issue where LLDB is crashing due to a 
>> > stack overflow when attempting to evaluate an expression.  I have seen the 
>> > same issue in 6.0.1 and have reproduced it in 7.0.1.  Any help to diagnose 
>> > and fix would be greatly appreciated as I am trying to meet a release 
>> > deadline early next week!
>> >
>> > The facts:
>> > - The expression being evaluated is not a valid expression in the C++ 
>> > domain. For example the expression is a datatype like 'Foobar'.  (For 
>> > reasons unexplained I am constrained to supporting this use case.)
>> > - The crash occurs when using the C++ LLDB API but not when trying to 
>> > evaluate the expression via the LLDB shell or the LLDB Python script 
>> > shell.  However, when doing 'expr Foobar' there is no output and the 
>> > operation is completely silent.  It is similar when trying to do 
>> > 'lldb.frame.EvaluateExpression("Foobar")' in the Python shell as well.  I 
>> > would expect to get some error output or an SbValue in an error state but 
>> > no such luck.
>> > - I was able to capture a stack trace (attached) and it seems to be a 
>> > recursive loop bottoming out.  For brevity two 'loops' of stacktrace are 
>> > included here:
>> >
>> > 3387.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
>> > clang::RecordDecl * D) Line 2965C++
>> > 3388.  liblldb.dll!`anonymous 
>> > namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
>> > 3389.  liblldb.dll!`anonymous 
>> > namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext & 
>> > Context, const clang::CXXRecordDecl * Class) Line 172C++
>> > 3390.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
>> > clang::RecordDecl * D) Line 2965C++
>> > 3391.  liblldb.dll!`anonymous 
>> > namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
>> > 3392.  liblldb.dll!`anonymous 
>> > namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext & 
>> > Context, const clang::CXXRecordDecl * Class) Line 172C++
>> > 3393.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
>> > clang::RecordDecl * D) Line 2965C++
>> >
>> > Help please :S
>> >
>> > Thanks,
>> > Ben
>> >
>> >
>> > ___
>> > lldb-dev mailing list
>> > lldb-dev@lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
>
> --
> "Sometimes I've believed as many as six impossible things before breakfast" - 
> Alice in Wonderland
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Stackoverflow crash when evaluating an invalid expression

2019-03-07 Thread Ben Ruthig via lldb-dev
Ah I see what happened.  My original e-mail was delayed because it was too
large but it was recently accepted by a moderator.

On Thu, Mar 7, 2019 at 1:19 PM Ben Ruthig  wrote:

> Hey Raphael,
>
> Yes, you did advise me to drop a D->dumpColor() call in to
> getASTRecordLayout().  For frustrating reasons I still haven't been able to
> capture those logs but when I do I will report back.
>
> Thanks so much for your help and quick response!
>
> Ben
>
> On Thu, Mar 7, 2019 at 12:56 PM Raphael Isemann 
> wrote:
>
>> Hi Ben,
>>
>> I think I already answered this last week:
>> http://lists.llvm.org/pipermail/lldb-dev/2019-February/014789.html
>>
>> I don't think you'll get an answer here without posting the
>> problematic source or giving any more information as I described in my
>> mail.
>>
>> Cheers,
>> - Raphael
>>
>> Am Do., 7. März 2019 um 18:13 Uhr schrieb Ben Ruthig via lldb-dev
>> :
>> >
>> > Hello all,
>> >
>> > I am currently investigating an issue where LLDB is crashing due to a
>> stack overflow when attempting to evaluate an expression.  I have seen the
>> same issue in 6.0.1 and have reproduced it in 7.0.1.  Any help to diagnose
>> and fix would be greatly appreciated as I am trying to meet a release
>> deadline early next week!
>> >
>> > The facts:
>> > - The expression being evaluated is not a valid expression in the C++
>> domain. For example the expression is a datatype like 'Foobar'.  (For
>> reasons unexplained I am constrained to supporting this use case.)
>> > - The crash occurs when using the C++ LLDB API but not when trying to
>> evaluate the expression via the LLDB shell or the LLDB Python script
>> shell.  However, when doing 'expr Foobar' there is no output and the
>> operation is completely silent.  It is similar when trying to do
>> 'lldb.frame.EvaluateExpression("Foobar")' in the Python shell as well.  I
>> would expect to get some error output or an SbValue in an error state but
>> no such luck.
>> > - I was able to capture a stack trace (attached) and it seems to be a
>> recursive loop bottoming out.  For brevity two 'loops' of stacktrace are
>> included here:
>> >
>> > 3387.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
>> clang::RecordDecl * D) Line 2965C++
>> > 3388.  liblldb.dll!`anonymous
>> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
>> > 3389.  liblldb.dll!`anonymous
>> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext &
>> Context, const clang::CXXRecordDecl * Class) Line 172C++
>> > 3390.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
>> clang::RecordDecl * D) Line 2965C++
>> > 3391.  liblldb.dll!`anonymous
>> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
>> > 3392.  liblldb.dll!`anonymous
>> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext &
>> Context, const clang::CXXRecordDecl * Class) Line 172C++
>> > 3393.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
>> clang::RecordDecl * D) Line 2965C++
>> >
>> > Help please :S
>> >
>> > Thanks,
>> > Ben
>> >
>> >
>> > ___
>> > lldb-dev mailing list
>> > lldb-dev@lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>
>
> --
> "Sometimes I've believed as many as six impossible things before
> breakfast" - Alice in Wonderland
>


-- 
"Sometimes I've believed as many as six impossible things before breakfast"
- Alice in Wonderland
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Stackoverflow crash when evaluating an invalid expression

2019-03-07 Thread Ben Ruthig via lldb-dev
Hey Raphael,

Yes, you did advise me to drop a D->dumpColor() call in to
getASTRecordLayout().  For frustrating reasons I still haven't been able to
capture those logs but when I do I will report back.

Thanks so much for your help and quick response!

Ben

On Thu, Mar 7, 2019 at 12:56 PM Raphael Isemann  wrote:

> Hi Ben,
>
> I think I already answered this last week:
> http://lists.llvm.org/pipermail/lldb-dev/2019-February/014789.html
>
> I don't think you'll get an answer here without posting the
> problematic source or giving any more information as I described in my
> mail.
>
> Cheers,
> - Raphael
>
> Am Do., 7. März 2019 um 18:13 Uhr schrieb Ben Ruthig via lldb-dev
> :
> >
> > Hello all,
> >
> > I am currently investigating an issue where LLDB is crashing due to a
> stack overflow when attempting to evaluate an expression.  I have seen the
> same issue in 6.0.1 and have reproduced it in 7.0.1.  Any help to diagnose
> and fix would be greatly appreciated as I am trying to meet a release
> deadline early next week!
> >
> > The facts:
> > - The expression being evaluated is not a valid expression in the C++
> domain. For example the expression is a datatype like 'Foobar'.  (For
> reasons unexplained I am constrained to supporting this use case.)
> > - The crash occurs when using the C++ LLDB API but not when trying to
> evaluate the expression via the LLDB shell or the LLDB Python script
> shell.  However, when doing 'expr Foobar' there is no output and the
> operation is completely silent.  It is similar when trying to do
> 'lldb.frame.EvaluateExpression("Foobar")' in the Python shell as well.  I
> would expect to get some error output or an SbValue in an error state but
> no such luck.
> > - I was able to capture a stack trace (attached) and it seems to be a
> recursive loop bottoming out.  For brevity two 'loops' of stacktrace are
> included here:
> >
> > 3387.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
> clang::RecordDecl * D) Line 2965C++
> > 3388.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> > 3389.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext &
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> > 3390.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
> clang::RecordDecl * D) Line 2965C++
> > 3391.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> > 3392.  liblldb.dll!`anonymous
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext &
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> > 3393.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const
> clang::RecordDecl * D) Line 2965C++
> >
> > Help please :S
> >
> > Thanks,
> > Ben
> >
> >
> > ___
> > lldb-dev mailing list
> > lldb-dev@lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>


-- 
"Sometimes I've believed as many as six impossible things before breakfast"
- Alice in Wonderland
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Stackoverflow crash when evaluating an invalid expression

2019-03-07 Thread Raphael Isemann via lldb-dev
Hi Ben,

I think I already answered this last week:
http://lists.llvm.org/pipermail/lldb-dev/2019-February/014789.html

I don't think you'll get an answer here without posting the
problematic source or giving any more information as I described in my
mail.

Cheers,
- Raphael

Am Do., 7. März 2019 um 18:13 Uhr schrieb Ben Ruthig via lldb-dev
:
>
> Hello all,
>
> I am currently investigating an issue where LLDB is crashing due to a stack 
> overflow when attempting to evaluate an expression.  I have seen the same 
> issue in 6.0.1 and have reproduced it in 7.0.1.  Any help to diagnose and fix 
> would be greatly appreciated as I am trying to meet a release deadline early 
> next week!
>
> The facts:
> - The expression being evaluated is not a valid expression in the C++ domain. 
> For example the expression is a datatype like 'Foobar'.  (For reasons 
> unexplained I am constrained to supporting this use case.)
> - The crash occurs when using the C++ LLDB API but not when trying to 
> evaluate the expression via the LLDB shell or the LLDB Python script shell.  
> However, when doing 'expr Foobar' there is no output and the operation is 
> completely silent.  It is similar when trying to do 
> 'lldb.frame.EvaluateExpression("Foobar")' in the Python shell as well.  I 
> would expect to get some error output or an SbValue in an error state but no 
> such luck.
> - I was able to capture a stack trace (attached) and it seems to be a 
> recursive loop bottoming out.  For brevity two 'loops' of stacktrace are 
> included here:
>
> 3387.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> clang::RecordDecl * D) Line 2965C++
> 3388.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> 3389.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext & 
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> 3390.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> clang::RecordDecl * D) Line 2965C++
> 3391.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> 3392.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext & 
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> 3393.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> clang::RecordDecl * D) Line 2965C++
>
> Help please :S
>
> Thanks,
> Ben
>
>
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Stackoverflow crash when evaluating an invalid expression

2019-02-28 Thread Raphael Isemann via lldb-dev
The most likely explanation is that we somehow build a Clang AST where
a class has it's itself as a base class or as a field type. Not sure
how that happened, but I assume something like CRTP could maybe
trigger such a bug.

Please break in `getASTRecordLayout` and run `D->dumpColor()` in two
different frames and post the output. Otherwise if you have a Release
build which you can modify, you can also add `D->dumpColor()` as the
first statement in clang::ASTContext::getASTRecordLayout (the file is
`llvm-project/clang/lib/AST/RecordLayoutBuilder.cpp:2965` ). This
should print the class which we presumably incorrectly reconstructed
and it's structure.

- Raphael

Am Do., 28. Feb. 2019 um 16:48 Uhr schrieb Ben Ruthig via lldb-dev
:
>
> Hello all,
>
> I am currently investigating an issue where LLDB is crashing due to a stack 
> overflow when attempting to evaluate an expression.  I have seen the same 
> issue in 6.0.1 and have reproduced it in 7.0.1.  Any help to diagnose and fix 
> would be greatly appreciated as I am trying to meet a release deadline early 
> next week!
>
> The facts:
> - The expression being evaluated is not a valid expression in the C++ domain. 
> For example the expression is a datatype like 'Foobar'.  (For reasons 
> unexplained I am constrained to supporting this use case.)
> - The crash occurs when using the C++ LLDB API but not when trying to 
> evaluate the expression via the LLDB shell or the LLDB Python script shell.  
> However, when doing 'expr Foobar' there is no output and the operation is 
> completely silent.  It is similar when trying to do 
> 'lldb.frame.EvaluateExpression("Foobar")' in the Python shell as well.  I 
> would expect to get some error output or an SbValue in an error state but no 
> such luck.
> - I was able to capture a stack trace (attached) and it seems to be a 
> recursive loop bottoming out.  For brevity two 'loops' of stacktrace are 
> included here:
>
> 3387.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> clang::RecordDecl * D) Line 2965C++
> 3388.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> 3389.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext & 
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> 3390.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> clang::RecordDecl * D) Line 2965C++
> 3391.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::ComputeEmptySubobjectSizes() Line 216C++
> 3392.  liblldb.dll!`anonymous 
> namespace'::EmptySubobjectMap::EmptySubobjectMap(const clang::ASTContext & 
> Context, const clang::CXXRecordDecl * Class) Line 172C++
> 3393.  liblldb.dll!clang::ASTContext::getASTRecordLayout(const 
> clang::RecordDecl * D) Line 2965C++
>
> Help please :S
>
> Thanks,
> Ben
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev