porting strace to Bionic libc (was: GSOC candidature draft for urgent feedback)
enh
enh at google.com
Wed Feb 26 02:14:30 UTC 2014
with the appropriate additions to our makefile, your tip of tree works
perfectly without patches except:
In file included from bionic/libc/include/signal.h:35:0,
from bionic/libc/include/sys/select.h:35,
from bionic/libc/include/unistd.h:34,
from external/strace/defs.h:57,
from external/strace/signal.c:34:
In function 'memcpy',
inlined from 'decode_new_sigaction' at external/strace/signal.c:1310:8:
bionic/libc/include/string.h:104:33: error: call to
'__memcpy_dest_size_error' declared with attribute error: memcpy
called with size bigger than destination
__memcpy_dest_size_error();
^
In function 'memcpy',
inlined from 'sys_sigreturn' at external/strace/signal.c:834:9:
bionic/libc/include/string.h:104:33: error: call to
'__memcpy_dest_size_error' declared with attribute error: memcpy
called with size bigger than destination
__memcpy_dest_size_error();
^
LP32 bionic's sigset_t is broken: it's only 4 bytes, so there's no
support for any of the RT signals. we've fixed this for LP64, but
until the time machine project ships i can't go back and fix LP32 :-(
On Tue, Feb 25, 2014 at 4:23 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
> On Tue, Feb 25, 2014 at 11:49:30AM -0800, enh wrote:
> [...]
>> one reason we've lagged behind upstream in the past is that we've
>> needed a lot of local hacks. some bionic's fault, some strace's. as
>> part of the recent upgrade i fixed the stuff that was bionic's fault,
>> and it looks like you've already fixed all the stuff on your side. i
>> still have local hacks for PTRACE_PEEKUSER but they look like they're
>> fixed at your head and i just need to wait for 4.9. the only remaining
>> diff i have is that bionic doesn't have <scsi/sg.h> so we can't build
>> scsi.c which means we can't refer to it in ioctl.c:
>>
>> +#ifndef HAVE_ANDROID_OS
>> case 0x22:
>> return scsi_ioctl(tcp, code, arg);
>> +#endif
>>
>> if you could add a configure "HAVE_SCSI_SG_H" or somesuch, i think we
>
> There is certainly no problem to add a check for <scsi/sg.h>.
> I've just pushed commit v4.8-130-gfdb896e to fix this.
>
>> could have no local diffs relative to 4.9. (for a while now i've been
>> asking people who submit fixes to us to submit them to you instead,
>> and then we cherrypick. chris.dearman's struct sigaction dumping fixes
>> were the most recent example.)
>
> Thanks.
>
>> [full disclosure: i actually have a handful of other hacks in the makefile:
>> # bionic doesn't have fputs_unlocked.
>> LOCAL_CFLAGS += -Dfputs_unlocked=fputs
>> # bionic doesn't have fopen64.
>> LOCAL_CFLAGS += -Dfopen64=fopen
>
> I've just pushed commit v4.8-132-gd354130 to handle this.
>
>> # uapi's asm/sigcontext.h doesn't have sigcontext_struct.
>> LOCAL_CFLAGS += -Dsigcontext_struct=sigcontext
>
> This is already fixed in HEAD by commit v4.8-86-ge2de3bd.
>
>> i could trivially add the last of these (and probably should), but our
>> stdio is actually just OpenBSD's, and BSD was smart enough not to have
>> a 32-bit off_t, so they don't have all the LFS64 crap. i think we're
>> stuck with that hack until one fine day when we can retire LP32. they
>> don't have the _unlocked stdio stuff either.
>> ]
>
> All build issues should be fixed in HEAD already, please give it a try.
> I'd like to be sure we haven't added build regressions since v4.8.
>
>
> --
> ldv
>
> ------------------------------------------------------------------------------
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel
>
--
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.
More information about the Strace-devel
mailing list