[Interest] QCoreApplication::arguments(): getting the application name safely during global destruction

René J. V. Bertin rjvbertin at gmail.com
Wed Jan 22 09:47:17 CET 2020


Thiago Macieira wrote:

> The chance that it has been overwritten is 100% at this point.

Are you certain this is true on all platforms? I seem to recall one where you 
can get at argc,argv through global variables (or where they functions...), 
possibly OS X or otherwise MS Windows.

> This was a return from main().

Then it must have been the last line in main(),

return qApp->exec();

I don't suppose QCoreApplication can see it's being called with a dynamically 
allocated `this` and do a `delete this` before returning so I guess I have 
another location to report.

R.



More information about the Interest mailing list