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
F168887404: D23935.id69097.diff
Sun, Aug 30, 3:10 PM
F168865339: D23935.id69096.diff
Sun, Aug 30, 12:37 PM
F168780676: D23935.id69413.diff
Sun, Aug 30, 3:10 AM
F168779941: D23935.id69098.diff
Sun, Aug 30, 3:05 AM
F168779598: D23935.id69101.diff
Sun, Aug 30, 3:03 AM
F168778730: D23935.diff
Sun, Aug 30, 2:56 AM
F168776968: D23935.id.diff
Sun, Aug 30, 2:43 AM
Unknown Object (File)
Mon, Aug 24, 7:39 AM
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 29743
Build 27581: 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
18

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.