Skip to content
Snippets Groups Projects
Forked from drm / igt-gpu-tools
200155 commits behind the upstream repository.
  • Petri Latvala's avatar
    ad0ac818
    WIP: lib/tests: Add test for handling asserts in threads · ad0ac818
    Petri Latvala authored
    
    Triggering an assert in a thread leads to calling siglongjmp to a
    jmpbuf created from another thread (the main thread). That's undefined
    behaviour and breaks all kinds of things.
    
    Other issues with threads currently: Interleaved backtrace printing,
    stack corruption because the longjmp succeeds in another thread and
    continuing execution modifies the stack for the other threads that are
    still running and triggering their asserts, no good automatic way of
    propagating failures to main thread otherwise.
    
    We probably need a whole framework for igt_thread á la igt_fork to
    handle all that.
    
    Signed-off-by: default avatarPetri Latvala <petri.latvala@intel.com>
    ad0ac818
    History
    WIP: lib/tests: Add test for handling asserts in threads
    Petri Latvala authored
    
    Triggering an assert in a thread leads to calling siglongjmp to a
    jmpbuf created from another thread (the main thread). That's undefined
    behaviour and breaks all kinds of things.
    
    Other issues with threads currently: Interleaved backtrace printing,
    stack corruption because the longjmp succeeds in another thread and
    continuing execution modifies the stack for the other threads that are
    still running and triggering their asserts, no good automatic way of
    propagating failures to main thread otherwise.
    
    We probably need a whole framework for igt_thread á la igt_fork to
    handle all that.
    
    Signed-off-by: default avatarPetri Latvala <petri.latvala@intel.com>