Page MenuHomeFreeBSD

New port: security/py-angr: multi-architecture binary analysis toolkit
ClosedPublic

Authored by 0mp on Mar 3 2020, 12:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 16, 2:09 PM
Unknown Object (File)
Wed, Mar 13, 8:55 PM
Unknown Object (File)
Feb 19 2024, 12:29 PM
Unknown Object (File)
Feb 7 2024, 11:14 PM
Unknown Object (File)
Feb 1 2024, 4:12 PM
Unknown Object (File)
Feb 1 2024, 4:12 PM
Unknown Object (File)
Feb 1 2024, 4:12 PM
Unknown Object (File)
Feb 1 2024, 4:12 PM
Subscribers

Details

Summary

The port builds just fine. There is only one part I am not sure about: I had to reimplement thread id retrieving (FreeBSD does not have __NR_gettid) and I am not sure if I did it correctly. I'd be grateful I someone could review it.

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244562

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 29744
Build 27582: arc lint + arc unit

Event Timeline

Update the __NR_gettid reimplementation

kaktus added inline comments.
security/py-angr/files/patch-native_log.c
20

There is no reason to zero errno here.

23
if (thr_self(&tid) <0 )…

or maybe just (if it links with pthreads)

dprintf(log_fd, "[%s][%s][%d] %s():%d ", timestr, logLevels[ll].descr, pthread_getthreadid_np(), fn, ln);
24

tid is already of type pid_t, no reason to cast it to pid_t again.

  • Simplify __NR_gettid implementation as suggested by kevans & kaktus.
  • Add a test targett

Tests are completely broken at the moment. The port is not ready to be shipped.

  • Do not cast tid to pid_t
0mp planned changes to this revision.Mar 3 2020, 1:42 AM
0mp marked 2 inline comments as done and an inline comment as not done.
0mp added inline comments.
security/py-angr/files/patch-native_log.c
17

This is the part which I am not sure about.

23

I'll try it out soon.

linimon retitled this revision from New port: security/py-angr to New port: security/py-angr: multi-architecture binary analysis toolkit.Mar 8 2020, 2:24 AM
0mp marked an inline comment as done.Mar 10 2020, 6:04 PM
0mp added inline comments.
security/py-angr/files/patch-native_log.c
23

Yeah, seems to compile.

This revision was not accepted when it landed; it landed in state Changes Planned.Mar 12 2020, 9:14 AM
Closed by commit rP528280: New port: security/py-angr (authored by 0mp). · Explain Why
This revision was automatically updated to reflect the committed changes.