Menu

#396 vos/windows_sim/vos_thread.c has a faulty code path

3.0.0.0
closed
Sim (13) 2339 (1)
2024-02-05
2022-05-04
No

When calling the vos_threadRegisterLocal(BOOL bStart) with the bStart value set to true, if the thread fails to get created (the execution goes inside the if (tsHandel == -1) block), the code quits the for loop (as intended), but then, despite the fact that the handle is negative, it still attempts to start this thread:

if (bStart)
    {
        TSstart(tsHandel);
    }

Which is causing a crash.

Discussion

  • Armin-Hagen Weiss

    • status: open --> accepted
    • assigned_to: Anders Öberg
     
  • Armin-Hagen Weiss

    • labels: --> Sim
     
  • Anders Öberg

    Anders Öberg - 2022-11-23

    Changed line 269
    from
    if (bStart)
    to
    if (bStart && ret == VOS_NO_ERR)

    Commited in 2339
    
     
  • Anders Öberg

    Anders Öberg - 2022-11-23
    • status: accepted --> closed
     
  • Armin-Hagen Weiss

    • labels: Sim --> Sim, 2339
     

Log in to post a comment.

MongoDB Logo MongoDB