Boost logo

Boost-Build :

Subject: [Boost-build] [bjam] crash on windows with --out-xml and timeout
From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2009-07-30 07:44:36


Hi !

I want to get XML-Test output from Boost.Build and run
bjam --dump-test --out-xml=dump.xml -l300
on Windows Server 2008 using bjam built with msvc-10 and msvc-9

Bjam crashes on the first timed out test because execnt.c calls
GetProcessTimes( process, &creation, &exit, &kernel, &user ) )
in execnt.c line 845. (trunk)
on a running process.
According to the msdn documentation, "exit" time is undefined if the process
has not exited.
The following calculation lead to a negative value for time->end and then jam
crashes at output.c, line 123
    strftime( buffer, 49, "%Y-%m-%d %H:%M:%SZ", gmtime( &value ) );

because "value" (time->end) is negative.
The attached patch fixes this (at least for me).

Any ideas or improments ?

Or shall I commit this one ?

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !



Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk