Bug 2018 - argv[0] shouldn't be used in TAO without checking argc and argv*
Summary: argv[0] shouldn't be used in TAO without checking argc and argv*
Status: ASSIGNED
Alias: None
Product: TAO
Classification: Unclassified
Component: ORB (show other bugs)
Version: 1.4.2
Hardware: All All
: P1 critical
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2004-12-29 14:39 CST by Johnny Willemsen
Modified: 2005-02-08 05:36 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johnny Willemsen 2004-12-29 14:39:30 CST
Under VxWorks (and probably also some other embedded OS's) it is normal that 
when the application is started, argc = 0 and argv* = 0, several parts of 
ACE/TAO/CIAO use argv[0] without checking for argc. argv[0] is then unitialized 
memory and results in a crash under VxWorks. All code using argv[0] should 
check argc and if zero, not use argv[0]. This means probably that a lot of 
usage messages should be updated to hardcode the application name. 

This also appears in the ACE library itself and the TAO core libraries, those 
have a higher priority to solve.

This should also be documented in the readme's and books.
Comment 1 Johnny Willemsen 2005-02-08 05:36:52 CST
accept