Bug 26247 - stap crash after Eliding side-effect-free expression
Summary: stap crash after Eliding side-effect-free expression
Status: RESOLVED INVALID
Alias: None
Product: systemtap
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-16 02:32 UTC by lijunlong
Modified: 2020-07-16 12:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lijunlong 2020-07-16 02:32:37 UTC
c code compile with cmd:  cc -g -O0 -Wall -std=gnu99 test.c

#cat test.c
typedef struct foo {
    int a;
} foo_t;

foo_t *v[1];

int main(void) {
    return 0;
}


stap code here:
# cat test.stp

function func_test()
{
    (var2_p = @vma(0x601038, "/tmp/a.out"));
}

probe process("/tmp/a.out").statement(0x4004f7) {
    func_test();
}


run with the following cmd
#stap -d ./a.out -c ./a.out test.stp

WARNING: address 0x4004f7 does not match the beginning of a statement (try 0x4004f6)
WARNING: Eliding assignment to 'var2_p': operator '=' at test.stp:3:14
 source: 	    (var2_p = @vma(0x601038, "/tmp/a.out"));
         	            ^
WARNING: Eliding side-effect-free expression : identifier 'func_test' at :7:6
 source: 	    func_test();
         	    ^
run_core.sh: line 2:  8767 Segmentation fault      (core dumped) stap -d ./a.out -c ./a.out test.stp
Comment 1 lijunlong 2020-07-16 02:50:32 UTC
I does not use official release version, so how can I delete the bug.
Comment 2 Frank Ch. Eigler 2020-07-16 12:04:01 UTC
Thanks for the report.
Yeah I don't think we have the @vma() support in the master version.
You can try   gdb -args stap .....   and run a backtrace.  In case
the crash implicates master version code, please reopen this.