[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] Re: [patch] Reduce Linux stack use.
From: |
Arun Sharma |
Subject: |
[Libunwind-devel] Re: [patch] Reduce Linux stack use. |
Date: |
Wed, 7 Oct 2009 12:45:13 -0700 |
On Mon, Oct 5, 2009 at 5:09 PM, Paul Pluzhnikov <address@hidden> wrote:
> -static inline void
> +static inline int
> maps_init (struct map_iterator *mi, pid_t pid)
> {
> - char path[PATH_MAX], *cp;
> + char path[sizeof ("/proc/01234567879/maps")], *cp;
>
Did you mean 789 and not 7879 above?
There seems to be an implicit assumption that size of pid_t is <= 32
bits (which seems to be true for all archs supported by linux). Since
you have an assert to check that, I'm ok with this change.
> - if (i < buf_size - 1)
> + if (valp != NULL && i < buf_size - 1)
Prefer parens around expressions.
I'll go ahead and make these two changes and apply.
-Arun