tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: refine of the GSOC project
Thanks for these feedbacks!
I will check against the standard for SA_ONSTACK.
I have removed _NETBSD_SOURCE when compiling the benchmark.
The problem is compiling with the default flag in the benchmark
(_POSIX_C_SOURCE),
it reports SA_ONSTACK is not found, but according to logic in
/usr/include/sys/signal.h,
it should be accessible. I think it is a system bug.
I will find it out.
2016-05-15 8:42 GMT-07:00 Christos Zoulas <christos%zoulas.com@localhost>:
> then we need to check the standard if it needs SA_ONSTACK exposed and if
> so change our headers. The tests should not really need to define
> _NETBSD_SOURCE defined to compile.
>
> christos
>
> On May 14, 2016, at 9:18 PM, Charles Cui <charles.cui1984%gmail.com@localhost>
> wrote:
>
> let's call this small program as test.c.
>
> There is no problem when executing the command gcc test.c,
>
> However, when executing as gcc test.c -D_POSIX_C_SOURCE=200112L, it
> reports SA_ONSTACK is not declared.
>
> _POSIX_C_SOURCE is enabled by default in the benchmark suite.
>
> If you guys think this flag is not necessary for us, then problem is
> solved.
>
>
> 2016-05-13 6:43 GMT-07:00 Christos Zoulas <christos%zoulas.com@localhost>:
>
>> On May 12, 9:50pm, charles.cui1984%gmail.com@localhost (Charles Cui) wrote:
>> -- Subject: Re: refine of the GSOC project
>>
>> | Well, your saying of _NETBSD_SOURCE is defined by default seems correct,
>> | I compiled a file in the benchmark separately which has the problem of
>> | accessing
>> | macro SA_ONSTACK
>> | <http://nxr.netbsd.org/source/s?refs=SA_ONSTACK&project=src> which
>> lives
>> | in <signal.h>. There is no problem in executing.
>> | However, I am still not convinced why _NETBSD_SOURCE does not take
>> effect
>> | in the benchmark execution? There is no #undef _NETBSD_SOURCE in the
>> | benchmark,
>> | also defining other macros will not affect _NETBSD_SOURCE (it will make
>> | multiple macros
>> | exist simultaneously). I am not quite clear why the default
>> _NETBSD_SOURCE
>> | does not
>> | work in the benchmark.
>> |
>> | this is from <signal.h>, benchmark using SA_ONSTACK reporting this macro
>> | not found.
>> |
>>
>> Why do you say that? Just compile and run this:
>>
>> #include <signal.h>
>> #include <stdio.h>
>>
>> int
>> main(void)
>> {
>> printf("%#x\n", SA_ONSTACK);
>> return 0;
>> }
>>
>> christos
>>
>
> <sanitizer.log>
>
>
Home |
Main Index |
Thread Index |
Old Index