PrintStack function

21 views
Skip to first unread message

Jianfei Shao

unread,
Apr 12, 2021, 1:17:22 PMApr 12
to S2E Developer Forum
Hi,

Could anyone explian what the following messages represent?
I can't find s2e_dummyMainFunction in the source code and I don't know what happened when call log.

KLEE: WARNING: calling external: log(0x3ff0000000000000). Return Type double
Stack: 
#0 0000 in helper_fyl2xp1 ()
#1 0000 in tcg-llvm-7825-b379af60 ( [0x7fcbe4009750])
#2 0000 in s2e_dummyMainFunction ()

441 [State 0] Terminating state: Could not find address of external function log

Thank you!

Vitaly Chipounov

unread,
Apr 12, 2021, 1:58:51 PMApr 12
to s2e...@googlegroups.com, Jianfei Shao

Hi,

When guest code attempts to access symbolic data, S2E translates it to LLVM up to the next control flow instruction. This block of LLVM code is packaged in a function called tcg-llvm-xxx-xxx. Some instructions are so complex that they resort to calling external helpers to perform their jobs. This results in calls to helper_xxx functions. Helpers can call standard library functions, e.g., log(). In this case, the interpreter didn't manage to find it [1].

If you could run "s2e export_project" and attach the file, it would help debugging.

Vitaly

[1] https://github.com/S2E/s2e/blob/bebe76f6ffd2c8bc3ac2b3d800d7bc05826b9dfe/klee/lib/Core/Executor.cpp#L1605

--
--
You received this message because you are a member of the S2E Developer Forum.
To post to this group, send email to s2e...@googlegroups.com
To unsubscribe from this group, send email to s2e-dev+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/s2e-dev

---
You received this message because you are subscribed to the Google Groups "S2E Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s2e-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/05b0d61e-ccb0-43ef-9480-d0a77f92a70an%40googlegroups.com.

Jianfei Shao

unread,
Apr 12, 2021, 4:53:18 PMApr 12
to S2E Developer Forum
I have modified the image of S2E which installed the NS-3 in it.

I have exported the project and upload it to Google Drive.

Follow the next steps can repeat the experiment.
1. Follow GitHub to build the image
2. Import the project uploaded in Google Drive.
3. Run the project and you'll see Terminating state: Could not find address of external function log.

In this experiment, we symbolized the IP address of the packet. It displayed "Could not find address of external function log." in a function related to time. In this time function, nothing is symbolic.

Thank you!
Jianfei Shao

Vitaly Chipounov

unread,
Apr 12, 2021, 5:18:17 PMApr 12
to s2e-dev

Jianfei Shao

unread,
Apr 12, 2021, 5:39:54 PMApr 12
to s2e...@googlegroups.com
Thank you!

Jianfei Shao

> 在 2021年4月13日,上午5:18,Vitaly Chipounov <vit...@cyberhaven.com> 写道:
>
> Thanks, I added the issue here: https://github.com/S2E/s2e-env/issues/435
> You received this message because you are subscribed to a topic in the Google Groups "S2E Developer Forum" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/s2e-dev/Ljkwn_s9JeU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to s2e-dev+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/CACjSjctGdXEVbsKk_8Ex%3DGg8H7yVtAUjF0cAgcz7xavQ__ZBjw%40mail.gmail.com.


Jianfei Shao

unread,
Apr 13, 2021, 12:19:15 AMApr 13
to s2e...@googlegroups.com
Would you please tell me how to find the corresponding source files and lines? For tcg-llvm, helper


Thank you!
Jianfei Shao

在 2021年4月13日,上午5:18,Vitaly Chipounov <vit...@cyberhaven.com> 写道:

Thanks, I added the issue here: https://github.com/S2E/s2e-env/issues/435
You received this message because you are subscribed to a topic in the Google Groups "S2E Developer Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/s2e-dev/Ljkwn_s9JeU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to s2e-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/s2e-dev/CACjSjctGdXEVbsKk_8Ex%3DGg8H7yVtAUjF0cAgcz7xavQ__ZBjw%40mail.gmail.com.

Vitaly Chipounov

unread,
Apr 13, 2021, 4:58:15 PMApr 13
to s2e...@googlegroups.com, Jianfei Shao

Hi,

In this case, grepping the error message and the helper name should give you the location.
By the way, I've just remembered that there was a very similar issue before and a PR to fix it, which didn't get merged unfortunately. Perhaps you could take it over. I updated the issue on Github.

Vitaly

Reply all
Reply to author
Forward
0 new messages