Re: [lldb-dev] SBValues referencing deallocated memory

2019-11-27 Thread Pavel Labath via lldb-dev
On 27/11/2019 08:47, Raphael “Teemperor” Isemann via lldb-dev wrote: This can also be reproduced in the command line like this: (lldb) expr "foo" (const char [4]) $0 = "foo" (lldb) expr "bar" (const char [4]) $1 = "bar" (lldb) expr $0 (const char [4]) $0 = “bar” This however works just fine: (

Re: [lldb-dev] SBValues referencing deallocated memory

2019-11-26 Thread Raphael “Teemperor” Isemann via lldb-dev
This can also be reproduced in the command line like this: (lldb) expr "foo" (const char [4]) $0 = "foo" (lldb) expr "bar" (const char [4]) $1 = "bar" (lldb) expr $0 (const char [4]) $0 = “bar” This however works just fine: (lldb) expr char c[] = "foo"; c (char [4]) $0 = "foo" (lldb) expr char c

[lldb-dev] SBValues referencing deallocated memory

2019-11-26 Thread Lutz Justen via lldb-dev
Hi, We're running into a problem where a Python SBValue references stale memory. It can be reproduced by evaluating an expression with a constant string: var1 = frame.EvaluateExpression("\"ABCDEFGEH\"") var2 = frame.EvaluateExpression("\"123456789\"") print(var1.GetSummary()) prin