From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) Description of problem: Some built-in tests (kio/tests/kioslavetest.cpp, kio/tests/metatest.cpp) contain incomplete definition for command line options. This definition must be done in accordance with KDELIBS-3.0 documentation (see http://developer.kde.org/documentation/library/3.0- api/classref/kdecore/KCmdLineArgs.html#KApplication). As that document states the last structure of options array must be {0,0,0}. But in these tests I see the following: ------kioslavetest.cpp:------ .... static KCmdLineOptions options[] = { { "s", 0, 0 }, { "src <src>", "Source URL", "" }, { "d", 0, 0 }, { "dest <dest>", "Destination URL", "" }, { "o", 0, 0 }, { "operation <operation>", "Operation (list,listrecursive,stat,get,copy,move,del,shred,mkdir)", "copy" }, { "p", 0, 0 }, { "progress <progress>", "Progress Type (none,default,status)", "default" } }; .... ---------------------------- It should be noted 'normal' applications (e.g. kde-config) from this package use {0,0,0} at the end of command line options. GCC 2.96 - and GCC 3.2-compiled tests run succesfully. But if another compiler (such as Intel C++ compiler for Linux) is being used there's crash in command line parser. May be this situation takes the place because compilers differently allocate memory for static objects. -------------kcmdlineargs.cpp (library 'kdecore'): // a part of command line parser, here I have segmentation violation ..... 524 void 525 KCmdLineArgs::parseAllArgs() 526 { 527 bool allowArgs = false; 528 bool inOptions = true; 529 bool everythingAfterArgIsArgs = false; 530 KCmdLineArgs *appOptions = argsList->last(); 531 if (!appOptions->id) 532 { 533 const KCmdLineOptions *option = appOptions->options; 534 while(option && option->name) 535 { 536 if (option->name[0] == '+') // Intel C++ Linux compiler crash here 537 allowArgs = true; 538 if ( option->name[0] == '!' && option->name[1] == '+' ) 539 { 540 allowArgs = true; 541 everythingAfterArgIsArgs = true; 542 } 543 option++; 544 } ..... ------------------------------------- The simplest way to solve the problem is to add {0,0,0} at the end of command line options (pathes are attached). Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. install Intel C++ compiler for Linux 2. build the package using Intel C++ compiler 3. cd kdelibs-3.0.0/kio/tests 4. make kioslavetest && ./.libs/lt-kioslavetest Actual Results: Segmentation fault Expected Results: application window must be shown. Additional info:
Created attachment 78384 [details] Patch for 'kioslavetest.cpp'
Created attachment 78385 [details] patch for 'metatest.cpp'
yes, some built-in tests here are broken. Thanks for your patch files.
It's fixed in 3.0.4-1