Skip to content

lldb: address 0x0000000100000000 maps to more than one section #2127

@ggreif

Description

@ggreif

Recently I have started to get strange warnings from wasmtime (HEAD) when running programs using lldb on Darwin. Below is a transcript.

../../llvm/bin/lldb -- target/debug/wasmtime -g sumsX.mo.wasm
(lldb) target create "target/debug/wasmtime"
Current executable set to '/Users/ggreif/motoko/wasmtime/target/debug/wasmtime' (x86_64).
(lldb) settings set -- target.run-args  "-g" "sumsX.mo.wasm"
(lldb) b spell
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) r
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000100000000 maps to more than one section: wasmtime.__TEXT and wasmtime.__TEXT
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000101636000 maps to more than one section: wasmtime.__DATA and wasmtime.__DATA
Process 73083 launched: '/Users/ggreif/motoko/wasmtime/target/debug/wasmtime' (x86_64)
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000100000000 maps to more than one section: wasmtime.__TEXT and wasmtime.__TEXT
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000101636000 maps to more than one section: wasmtime.__DATA and wasmtime.__DATA
Process 73083 exited with status = 0 (0x00000000) 
(lldb) r
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000100000000 maps to more than one section: wasmtime.__TEXT and wasmtime.__TEXT
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000101636000 maps to more than one section: wasmtime.__DATA and wasmtime.__DATA
Process 73151 launched: '/Users/ggreif/motoko/wasmtime/target/debug/wasmtime' (x86_64)
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000100000000 maps to more than one section: wasmtime.__TEXT and wasmtime.__TEXT
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000101636000 maps to more than one section: wasmtime.__DATA and wasmtime.__DATA
Process 73151 exited with status = 0 (0x00000000) 
(lldb) r
Process 73211 launched: '/Users/ggreif/motoko/wasmtime/target/debug/wasmtime' (x86_64)
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000100000000 maps to more than one section: wasmtime.__TEXT and wasmtime.__TEXT
warning: (x86_64) /Users/ggreif/motoko/wasmtime/target/debug/wasmtime(0x0000000100000000) address 0x0000000101636000 maps to more than one section: wasmtime.__DATA and wasmtime.__DATA
Process 73211 exited with status = 0 (0x00000000) 
(lldb) r
Process 73238 launched: '/Users/ggreif/motoko/wasmtime/target/debug/wasmtime' (x86_64)
1 location added to breakpoint 1
Process 73238 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000104728e51 JIT(0x108100000)`spell(dayX=(null)::tue) at sumsX.mo:36:5
   33   
   34   //func spell (day : Weekday) : Text =
   35   func spell (dayX : { #mon; #tue; #wed }) : Text =
-> 36       switch dayX {
   37           case (#mon) "Monday";
   38           case (#tue) "Tuesday";
   39           case _ "Weekend"
(lldb) 

As you can see, I needed several attempts until I could enter. I am attaching the sources. The lldb I use is derived from the rust-lang/llvm-project (branch 2020-05). The symptoms appear without setting a breakpoint also, so I don't think they are language specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions