This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/12155] MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_ have different effect for setgid than for setuid programs
- From: "mtk.manpages at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 30 Jun 2014 08:32:06 +0000
- Subject: [Bug malloc/12155] MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_ have different effect for setgid than for setuid programs
- Auto-submitted: auto-generated
- References: <bug-12155-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=12155
--- Comment #8 from Michael Kerrisk <mtk.manpages at gmail dot com> ---
(In reply to Florian Weimer from comment #7)
> The strace invocation looks suspicious. Ptracing a process will inhibit the
> SUID/SGID transition, particularly if run as an unprivileged user, as the $
> prompt suggests. Michael, are you sure you are running strace in the right
> way?
Ach! You're exactly right. I completely overlooked this strace(1) behavior.
Running my program under strace(1) the right way:
$ MALLOC_MMAP_THRESHOLD_=50000 sudo strace -u mtk -o o ./t_M_MMAP_THRESHOLD -1
-1 0 1000 100000
$ grep brk o | wc; grep mmap o| wc
1002 3006 52104
9 72 862
In other words, MALLOC_MMAP_THRESHOLD_ has no effect, as it should.
Thanks for educating me, Florian.
--
You are receiving this mail because:
You are on the CC list for the bug.