[PHP-DEV] Re: non-PIC build broken on oss-fuzz

2019-09-09 Thread Stanislav Malyshev
Hi!

On 9/9/19 2:16 AM, Dmitry Stogov wrote:
> I've just rechecked, when PHP configured with "--with-pic", libtool
> generates only PIC object files and there is no difference between *.lo
> to *.o files.

Sorry, you were right, --with-pic works, it was my mistake.


-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: non-PIC build broken on oss-fuzz

2019-09-09 Thread Stanislav Malyshev
Hi!

>> I added --with-pic, it didn't change anything, same error.
> 
> See .

I am sorry, I don't understand how that comment helps. Could you explain
a bit further, what needs to be done to make the build work again?
configure --with-pic does not help to solve the problem.

-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: non-PIC build broken on oss-fuzz

2019-09-09 Thread Stanislav Malyshev
Hi!

On 9/9/19 12:57 AM, Dmitry Stogov wrote:
> how do you add "-pie" flag?

I do not. I just compile PHP. The script used to configure and build it
is here:
https://github.com/google/oss-fuzz/blob/master/projects/php/build.sh
There are no special flags there as far as I can see. The fuzzing SAPI
lives here: https://github.com/php/php-fuzzing-sapi
The compiler used is clang. You can reproduce the build by using Docker
and these instructions:
https://google.github.io/oss-fuzz/getting-started/new-project-guide/#testing-locally

Specifically:
python infra/helper.py build_image php
python infra/helper.py build_fuzzers --sanitizer address php
or, if you want to see the details, instead of second command, use:
python infra/helper.py shell php
and then:
compile

-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: non-PIC build broken on oss-fuzz

2019-09-09 Thread Christoph M. Becker
On 09.09.2019 at 09:29, Stanislav Malyshev wrote:

>> I suspect the problem caused by "-pie" linker flag (It requires all
>> object files to be build with -fPIE or -fPIC).
>> To quick fix this, you may add PHP configure flag "--with-pic".
>> Actually, this should build PHP as before the patch.
>
> I added --with-pic, it didn't change anything, same error.

See .

--
Christoph M. Becker

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: non-PIC build broken on oss-fuzz

2019-09-09 Thread Stanislav Malyshev
Hi!

> I suspect the problem caused by "-pie" linker flag (It requires all
> object files to be build with -fPIE or -fPIC).
> To quick fix this, you may add PHP configure flag "--with-pic".
> Actually, this should build PHP as before the patch.

I added --with-pic, it didn't change anything, same error.

-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php