Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
> On Apr 13, 2018, at 23:52 , Steffen Hirschmann > wrote: > > On 13:22 Fri 13 Apr , Rick Mann via cfe-users wrote: >> I'm using `strrchr("/" __FILE__, '/') + 1`. Should that also get resolved? > Just have a look at a minimal example on godbolt: > https://godbolt.org/g/MRjGG3 > > Indeed th

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Steffen Hirschmann via cfe-users
On 13:22 Fri 13 Apr , Rick Mann via cfe-users wrote: > I'm using `strrchr("/" __FILE__, '/') + 1`. Should that also get resolved? Just have a look at a minimal example on godbolt: https://godbolt.org/g/MRjGG3 Indeed the function call gets resolved at compile time. But that does not mean that o

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
I'm using `strrchr("/" __FILE__, '/') + 1`. Should that also get resolved? I'm building now to see if this is even the reason the strings are popping up, but our build is long and complicated, so I'm not sure there's not some other source of the data. > On Apr 12, 2018, at 23:36 , Duncan P. N.

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
It would, indeed. Too bad it's not in the current Xcode. > On Apr 13, 2018, at 02:30 , Kim Gräsman wrote: > > There's a patch waiting for attention here: > https://reviews.llvm.org/D17741 > > Looks like that would be great for you? > > - Kim > > On Fri, Apr 13, 2018 at 9:49 AM, Rick Mann via

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Kim Gräsman via cfe-users
There's a patch waiting for attention here: https://reviews.llvm.org/D17741 Looks like that would be great for you? - Kim On Fri, Apr 13, 2018 at 9:49 AM, Rick Mann via cfe-users wrote: > No kidding! I know we use code similar to that. I’ll have to check when I’m > back at the computer. > > I

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
No kidding! I know we use code similar to that. I’ll have to check when I’m back at the computer. I also need to find a solution for Swift, but that’s another list. -- Rick Mann rm...@latencyzero.com > On Apr 12, 2018, at 23:36, Duncan P. N. Exon Smith > wrote: > > `strrchr(__FILE__, '/')+

Re: [cfe-users] App security and the __FILE__ macro

2018-04-12 Thread Duncan P. N. Exon Smith via cfe-users
`strrchr(__FILE__, '/')+1` should get resolved at compile-time whenever you have optimizations on. > On Apr 12, 2018, at 15:38, Rick Mann via cfe-users > wrote: > > The higher-ups decided we needed penetration testing of our app. One of their > concerns was that if you run the macOS strings t