https://llvm.org/bugs/show_bug.cgi?id=23465
Bug ID: 23465 Summary: getenv() returns a null char* when debugging with lldb Product: lldb Version: 3.3 Hardware: Macintosh OS: MacOS X Status: NEW Severity: release blocker Priority: P Component: All Bugs Assignee: lldb-dev@cs.uiuc.edu Reporter: samuel.te...@gmail.com Classification: Unclassified When calling getenv() with a valid environment variable name, a null char* is returned and the following error report is shown by lldb when calling "new std::string()" with the return value of getenv(): Process 21805 stopped * thread #1: tid = 0x172288, 0x00007fff80e61152 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x00007fff80e61152 libsystem_c.dylib`strlen + 18 libsystem_c.dylib`strlen: -> 0x7fff80e61152 <+18>: pcmpeqb (%rdi), %xmm0 0x7fff80e61156 <+22>: pmovmskb %xmm0, %esi 0x7fff80e6115a <+26>: andq $0xf, %rcx 0x7fff80e6115e <+30>: orq $-0x1, %rax (lldb) v lldb-330.0.44 This doesn't happen when executing the compiled binary without lldb. Using Mac OS X v10.10.3 (Yosemite) -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list lldb-dev@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev