Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 6:33 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 6:12 PM, Vedant Kumar > wrote: > >> On Oct 13, 2017, at 6:05 PM, Peter Collingbourne > > wrote: >> >> >> >> On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kuma

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 6:12 PM, Vedant Kumar wrote: > > On Oct 13, 2017, at 6:05 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kumar wrote: > >> >> On Oct 13, 2017, at 4:33 PM, Peter Collingbourne wrote: >> >> >> >> On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kuma

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 6:05 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kumar > wrote: > >> On Oct 13, 2017, at 4:33 PM, Peter Collingbourne > > wrote: >> >> >> >> On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kuma

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kumar wrote: > > On Oct 13, 2017, at 4:33 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kumar wrote: > >> >> On Oct 13, 2017, at 4:08 PM, Peter Collingbourne wrote: >> >> On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbour

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 4:33 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kumar > wrote: > >> On Oct 13, 2017, at 4:08 PM, Peter Collingbourne > > wrote: >> >> On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kumar wrote: > > On Oct 13, 2017, at 4:08 PM, Peter Collingbourne wrote: > > On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne > wrote: > >> Here's a small reproducer. >> >> struct A { >> virtual void f(...); >> }; >> >> struct B : virtual A { >> v

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 4:08 PM, Peter Collingbourne wrote: > > On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne > wrote: > Here's a small reproducer. > > struct A { > virtual void f(...); > }; > > struct B : virtual A { > virtual void b(); > virtual void f(...

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne wrote: > Here's a small reproducer. > > struct A { > virtual void f(...); > }; > > struct B : virtual A { > virtual void b(); > virtual void f(...); > }; > > void B::f(...) {} > > $ clang++ -fsanitize=function fsan.cpp -ffunction-sections

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
Here's a small reproducer. struct A { virtual void f(...); }; struct B : virtual A { virtual void b(); virtual void f(...); }; void B::f(...) {} $ clang++ -fsanitize=function fsan.cpp -ffunction-sections -fdata-sections -c -o /dev/null fatal error: error in backend: Cannot represent a dif

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 2:52 PM, Eric Christopher wrote: > > > > On Fri, Oct 13, 2017 at 2:50 PM Vedant Kumar > wrote: >> On Oct 13, 2017, at 1:44 PM, Eric Christopher > > wrote: >> >> >> >> On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar >

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Eric Christopher via cfe-commits
On Fri, Oct 13, 2017 at 2:50 PM Vedant Kumar wrote: > On Oct 13, 2017, at 1:44 PM, Eric Christopher wrote: > > > > On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar wrote: > >> On Oct 13, 2017, at 1:39 PM, Vedant Kumar wrote: >> >> Hey Eric, >> >> I'm sorry for the breakage. I made sure to check th

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 1:44 PM, Eric Christopher wrote: > > > > On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar > wrote: >> On Oct 13, 2017, at 1:39 PM, Vedant Kumar > > wrote: >> >> Hey Eric, >> >> I'm sorry for the breakage. I made sure to check t

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Eric Christopher via cfe-commits
On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar wrote: > On Oct 13, 2017, at 1:39 PM, Vedant Kumar wrote: > > Hey Eric, > > I'm sorry for the breakage. I made sure to check the run-time tests in > compiler-rt but we could have missing coverage there. > > The original version of this patch restricte

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 1:39 PM, Vedant Kumar wrote: > > Hey Eric, > > I'm sorry for the breakage. I made sure to check the run-time tests in > compiler-rt but we could have missing coverage there. > > The original version of this patch restricted the prologue data changes to > Darwin only. We

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
Hey Eric, I'm sorry for the breakage. I made sure to check the run-time tests in compiler-rt but we could have missing coverage there. The original version of this patch restricted the prologue data changes to Darwin only. We can switch back to that easily, just let me know. vedant > On Oct

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Eric Christopher via cfe-commits
Hi Vedant, So this actually broke -fsanitize=function on linux. Han is working up a testcase for it, but letting you know for now that we'll probably need some change here. -eric On Tue, Sep 12, 2017 at 5:05 PM Vedant Kumar via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: vedantk