[GHC] #16046: -fno-stack-protector still necessary?

#16046: -fno-stack-protector still necessary? -------------------------------------+------------------------------------- Reporter: clumens | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- aclocal.m4 has a block of code that checks to see if gcc supports -fno- stack-protector and adds that flag if so. That ends up in /usr/lib/ghc/settings, gets passed in whenever C bits get built, etc. I see that block was moved into place in 2010, but is even older than that. What I'm wondering is: is that still necessary to do, or do ghc and stack protection play nicely together now? I've searched around but can't find much information about it (searching for ghc and stack is a lot harder since that program appeared). The one thing I've found is: https://gitweb.gentoo.org/repo/gentoo.git/commit/dev- lang/ghc?id=8cee49e4a6c8d9ec80faa4054b621467450d3ebb I'm in charge of building Haskell-related stuff for a semi-private Linux distribution and just want to make sure I'm getting things right. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16046 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16046: -fno-stack-protector still necessary? -------------------------------------+------------------------------------- Reporter: clumens | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.4.3 (make) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by clumens): * component: Compiler => Build System (make) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16046#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16046: -fno-stack-protector still necessary? -------------------------------------+------------------------------------- Reporter: clumens | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.4.3 (make) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by slyfox): * cc: slyfox (added) Comment: Interesting. Initially this change was added for openbsd specifically for ghc-6.5: changeset:f638fdfe1d9de1307355c8074fbff9c28342c0ef (2006) and later it was extended to cover osx: changeset:c2cd83e7d85c11e6a33e1cde263eb2312566d535 (2009) None of the reports hint at exact breakage. I guess both happened in -fvia-C mode where GHC's Evil Mangler had a chance to mangle stack canaries generated by fstack-protector. As ghc has no evil mangler anymore it could work. I'll prepare a patch. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16046#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16046: -fno-stack-protector still necessary? -------------------------------------+------------------------------------- Reporter: clumens | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.4.3 (make) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5465 Wiki Page: | -------------------------------------+------------------------------------- Changes (by slyfox): * differential: => Phab:D5465 Comment: I spent some time trying to reproduce failure on modern OpenBSD and got no new failures. Let's remove the option. Sent https://phabricator.haskell.org/D5465 for review. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16046#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16046: -fno-stack-protector still necessary?
-------------------------------------+-------------------------------------
Reporter: clumens | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 8.4.3
(make) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5465
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#16046: -fno-stack-protector still necessary? -------------------------------------+------------------------------------- Reporter: clumens | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.4.3 (make) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5465 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16046#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC