Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#52232 - [gcc-multilib] "stack-protector" options are ignored
Attached to Project:
Community Packages
Opened by Constantine (Hi-Angel) - Thursday, 22 December 2016, 09:29 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 22 December 2016, 11:13 GMT
Opened by Constantine (Hi-Angel) - Thursday, 22 December 2016, 09:29 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 22 December 2016, 11:13 GMT
|
DetailsDescription:
I don't know if the problem is upstream or downstream, so I'm reporting here. Additional info: * package version(s) 6.2.1-1 Steps to reproduce: $ cat test.c void test(const char* from, char* to, int n) { for(int i=0; i<n; ++i) to[i] = from[i]; } $ gcc test.c -c -O0 -fno-stack-protector -o test-fno.o $ gcc test.c -c -O0 -fstack-protector -o test-fyes.o $ gcc test.c -c -O0 -fstack-protector-strong -o test-fstrong.o $ md5sum *.o 549c76421fa3e2b62d4e26c69e7e6678 test-fno.o 549c76421fa3e2b62d4e26c69e7e6678 test-fstrong.o 549c76421fa3e2b62d4e26c69e7e6678 test-fyes.o |
This task depends upon
Closed by Levente Polyak (anthraxx)
Thursday, 22 December 2016, 11:13 GMT
Reason for closing: Not a bug
Thursday, 22 December 2016, 11:13 GMT
Reason for closing: Not a bug
$ cat test.c
#include <stdlib.h>
char* test(const char* from, int n) {
char* buf = malloc(n);
for(int i=0; i<n; ++i)
buf[i] = from[i];
return buf;
}
$ gcc test.c -c -O0 -fno-stack-protector -o test-fno.o
$ gcc test.c -c -O0 -fstack-protector -o test-fyes.o
$ gcc test.c -c -O0 -fstack-protector-strong -o test-fstrong.o
$ md5sum *.o
72d9f80f0155b01d89a460adbf0097bf test-fno.o
da8f63de238338abc28a97717da486a2 test-fstrong.o
da8f63de238338abc28a97717da486a2 test-fyes.o
Btw, experiment shows: gcc defaults to "fno-stack-protector" which is what I actually wanted to know :ะท
I'm sorry. How do I close the bug?