public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* Prevent unbounded stack usage in libraries
@ 2015-05-23 21:10 Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2015-05-23 21:10 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

Hi,

The following patches makes sure we can use gcc -Wstack-usage
to check there is no unbounded stack usage. This is mostly done by
changing unbounded alloca or dynamic stack arrays into a fixed bounded
stack array or just calling malloc and free directly.

The last patch adds -Wstack-usage to eu.am enabled by default.
All the library code now compiles without stack-usage warnings.
Most of the src tools files don't yet. Exceptions have been added
to src/Makefile.am. I hope to eventually be able to build everything
with bounded stack usage that the compiler can check.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Prevent unbounded stack usage in libraries
@ 2015-05-27 21:14 Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2015-05-27 21:14 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

On Sat, May 23, 2015 at 11:10:13PM +0200, Mark Wielaard wrote:
> The following patches makes sure we can use gcc -Wstack-usage
> to check there is no unbounded stack usage. This is mostly done by
> changing unbounded alloca or dynamic stack arrays into a fixed bounded
> stack array or just calling malloc and free directly.

I pushed this patch series, with the changes suggested by Roland,
to master now.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-27 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-23 21:10 Prevent unbounded stack usage in libraries Mark Wielaard
2015-05-27 21:14 Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).