[prev in list] [next in list] [prev in thread] [next in thread]
List: strace
Subject: Re: [PATCH v3] Implement -e trace=/regex option
From: "Dmitry V. Levin" <ldv () altlinux ! org>
Date: 2017-04-13 14:45:46
Message-ID: 20170413144545.GB8042 () altlinux ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Thu, Apr 13, 2017 at 09:33:06AM +0800, JingPiao Chen wrote:
> On Thu, Apr 13, 2017 at 5:10 AM, Dmitry V. Levin wrote:
> >On Wed, Apr 12, 2017 at 09:31:51PM +0800, JingPiao Chen wrote:
> >> @@ -198,6 +199,48 @@ qualify_syscall_number(const char *s, struct
> number_set *set)
> >> return done;
> >> }
> >>
> >> +static bool
> >> +qualify_syscall_regex(const char *s, struct number_set *set)
> >> +{
> >> + regex_t preg;
> >> + int rc;
> >> +
> >> + if ((rc = regcomp(&preg, s, REG_EXTENDED | REG_NOSUB)) != 0) {
> >> + size_t len = regerror(rc, &preg, NULL, 0);
> >> + char buf[len];
> >
> >We don't use VLA on the stack, it is not portable. In particular,
> >it won't pass travis-ci clang tests. If you've pushed it to github
> >and enabled travis-ci, you'd have noticed.
>
> Ok, I replace it with alloca. But it pass travis-ci clang tests [1],
Well, I'm surprised.
> and strace have similar code in socketutils.c:152.
It's not quite similar, there are two constant values there.
--
ldv
["signature.asc" (application/pgp-signature)]
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic