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:

(lldb) expr char c[] = "foo"; c
(char [4]) $0 = "foo"
(lldb) expr char c[] = "bar"; c
(char [4]) $1 = "bar"
(lldb) expr $0
(char [4]) $0 = “foo”

I don’t know the related code so well, but from what I remember we have 
a storage mechanism for persistent variables that we fill up (in 
the ‘Materializer’ IIRC). We probably just copy the pointer itself to 
this storage but not the memory it points to. I guess we could tweak 
that logic to detect pointers that point into memory LLDB allocated and 
then either extract the necessary memory into our storage or keep the 
related sections around.


Anyway, I filed https://bugs.llvm.org/show_bug.cgi?id=44155 and I will 
ask around what solution people would prefer once thanksgiving is over.




You can find a kind of a description of how this is meant to work in 
.


Persisting string literals that were typed into the expression seems 
reasonable and hopefully not too difficult, and it would kind of match 
what happens during "normal" compilation. Doing that for random "const 
char *"s that you happen to stumble upon in the result variable seems 
more problematic, and I'm not sure we should even try...


pl
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 44160] New: TestSteppingOutWithArtificialFrames.py fails on AArch64 Ubuntu

2019-11-27 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=44160

Bug ID: 44160
   Summary: TestSteppingOutWithArtificialFrames.py fails on
AArch64 Ubuntu
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: diana.pi...@linaro.org
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

Traceback:
  File
"/home/buildslave/buildslave/lldb-cmake-aarch64/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py",
line 111, in wrapper
func(*args, **kwargs)
  File
"/home/buildslave/buildslave/lldb-cmake-aarch64/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py",
line 84, in test_return_past_artificial_frame
self.assertEqual(frame2.GetDisplayFunctionName(), "func2()")
AssertionError: None != 'func2()'

It seems that after stepping out we have this backtrace:
runCmd: thread backtrace
output: * thread #1, name = 'a.out', stop reason = breakpoint 1.1
  frame #0: 0x

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 44161] New: TestTrivialABI.py fails on AArch64 Ubuntu

2019-11-27 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=44161

Bug ID: 44161
   Summary: TestTrivialABI.py fails on AArch64 Ubuntu
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: diana.pi...@linaro.org
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

FAIL: test_call_nontrivial (TestTrivialABI.TestTrivialABI)
   Test that we can print a variable & call a function on the same class w/o
the trivial ABI marker.
--
Traceback (most recent call last):
  File
"/home/diana.picus/llvm-envs/lldb/llvm/lldb/packages/Python/lldbsuite/test/decorators.py",
line 141, in wrapper
func(*args, **kwargs)
  File
"/home/diana.picus/llvm-envs/lldb/llvm/lldb/packages/Python/lldbsuite/test/decorators.py",
line 111, in wrapper
func(*args, **kwargs)
  File
"/home/diana.picus/llvm-envs/lldb/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py",
line 34, in test_call_nontrivial
self.expr_test(False) 
  File
"/home/diana.picus/llvm-envs/lldb/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py",
line 74, in expr_test
self.check_frame(threads[0])
  File
"/home/diana.picus/llvm-envs/lldb/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py",
line 59, in check_frame
self.check_value(outVal_ret, 30)
  File
"/home/diana.picus/llvm-envs/lldb/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py",
line 41, in check_value
self.assertTrue(test_var.GetError().Success(), "Invalid valobj:
%s"%(test_var.GetError().GetCString()))
AssertionError: False is not True : Invalid valobj: error: No value

Stepping out seems to work ok, the backtraces before and after look sane:
*** Before ***
runCmd: thread backtrace
output: * thread #1, name = 'a.out', stop reason = breakpoint 1.1
  * frame #0: 0x00400704 a.out`takeTrivial(inVal=(ivar = 10)) at
main.cpp:10:3
frame #1: 0x004007cc a.out`main at main.cpp:29:12
frame #2: 0xb7c448a0 libc.so.6`__libc_start_main + 224
frame #3: 0x004005f8 a.out`_start + 40

*** After stepping out ***
runCmd: thread backtrace
output: * thread #1, name = 'a.out', stop reason = step out

  * frame #0: 0x004007cc a.out`main at main.cpp:29:12
frame #1: 0xb7c448a0 libc.so.6`__libc_start_main + 224
frame #2: 0x004005f8 a.out`_start + 40

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [Release-testers] LLVM 9.0.1-rc1 Release has been tagged

2019-11-27 Thread Tom Stellard via lldb-dev
On 11/25/2019 11:35 PM, Tobias Hieta wrote:
> Hello,
> 
> I built for macOS - I can't upload via SFTP since I never got that
> access. But the build can be downloaded here:
> https://drive.google.com/file/d/1qULDWqHK5s1dHiCyS32BE2ZgxaTjlSSu/view?usp=sharing
> 
> the SHA256 is: 
> 646b0acae090d09d74c7fd4f0cb19409190d4e2ce3ddb9db4ac236f72a213c1a
> 
> I see that some people post test output - but I can't see that from
> running the test-release.sh (btw it worked fine with Git now) - is
> there something else I need to do?
> 

There should be a log file with build and test output.

-Tom

> Thanks,
> Tobias
> 
> On Sat, Nov 23, 2019 at 7:20 AM Tom Stellard via Release-testers
>  wrote:
>>
>> Hi,
>>
>> I've tagged the LLVM 9.0.1-rc1 release.  Testers can begin testing and upload
>> binaries.  I've also updated the test-release.sh script to pull from GitHub
>> instead of SVN, if you run into any issues with the new script, let me know.
>>
>> -Tom
>>
>> ___
>> Release-testers mailing list
>> release-test...@lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/release-testers
> 

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev