This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug glob/24607] Segmentation Fault in Glob with invalid path
- From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 23 May 2019 18:15:23 +0000
- Subject: [Bug glob/24607] Segmentation Fault in Glob with invalid path
- Auto-submitted: auto-generated
- References: <bug-24607-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=24607
--- Comment #7 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Nicholas Starke from comment #6)
> Thank you to Jonathan Cottrill for the in-depth reproduction steps. This is
> nearly exactly how I triaged the initial crash.
>
> I apologize for not attaching the full proof of concept test harness for
> reproducing this. That's my mistake.
>
> What sort of information do you need at this point? How can I help in your
> assessment?
My understanding is it works as intended. The pattern triggers a recursive
call on glob implementation, where when glob sees 'pattern/' it expands
'pattern' by calling.
The valgring massif tool shows a peak usage of 9,606,960 bytes for this
testcase and usually, distro sets the default limit of stack to around 8MB.
To lower the glob stack usage it would require a complete refactor to
save/restore the state in a heap-allocated variable and remove the recursion.
--
You are receiving this mail because:
You are on the CC list for the bug.