Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a few fixes (thread safety & cl_khr_command_buffer UB) #1840

Merged
merged 3 commits into from
Oct 8, 2024

Commits on Oct 1, 2024

  1. Fix UB bug in extensions/cl_khr_command_buffer/command_buffer_test_ba…

    …rrier.cpp
    
    BarrierWithWaitListKHR::Run in command_buffer_test_barrier.cpp contains a
    "check second enqueue" which tries to zero out the cl_mems before enqueueing
    the command buffer again. However, the zeroing commands are enqueued to the
    in-order queue, while the command buffer to the out-of-order queue. Since there
    is no implicit or explicit sync, this is undefined behaviour.
    franz committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    e88e5fb View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Fix UB bug in extensions/cl_khr_command_buffer/command_buffer_event_s…

    …ync.cpp
    
    RunCombufWaitForSecQueueCombuf() is launching two clEnqueueFillBuffer commands
    on two separate queues, however both had the same buffer argument, and there
    was no synchronization between the commands.
    
    * add an event dependency to the second FillBuffer to ensure correct execution
    * change the fill pattern of the first FillBuffer to a different pattern
    franz committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    b117ba7 View commit details
    Browse the repository at this point in the history
  2. test_thread_dimensions.cpp: make the test thread-safe

    replaced static variables with stack variables
    franz committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    374a62a View commit details
    Browse the repository at this point in the history