You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
syz_thread_get_info(volatile int thread_id, volatile int packed_info_struct)
long syz_thread_get_info(volatile int thread_id, volatile int packed_info_struct) {
rt_thread_t thread = (rt_thread_t)thread_id;
// Ensure the pointer is valid and points to allocated memory
info_struct* info = (info_struct*) malloc(sizeof(info_struct));
if (info == NULL) {
rt_kprintf("Memory allocation failed.\n");
return -2; // Memory allocation failure
}
if (!rt_thread_find(thread)) {
free(info);
rt_kprintf("Thread does not exist.\n");
return -1; // Thread does not exist
}
rt_err_t result = rt_thread_control(thread, RT_THREAD_CTRL_INFO, info);
if (result == RT_EOK) {
// Copy or process the info as needed
rt_kprintf("Thread info retrieved successfully.\n");
free(info);
return 0; // Success
} else {
rt_kprintf("Failed to retrieve thread info, error: %d\n", result);
free(info);
return -3; // Error retrieving thread info
}
}
RT-Thread Version
5.2.0 commit 2f55990
Hardware Type/Architectures
VEXPRESS_A9
Develop Toolchain
GCC
Describe the bug
Describe the bug
The rt_hw_timer_isr interrupt handler did not correctly enter the interrupt context, or rt_interrupt_get_nest() returned an incorrect value.
Steps to reproduce
1.Build RT-Thread
2.Use the following command to start the kernel with QEMU:
3.Use the functions and parameters provided in the ’Test case‘ section for testing
Source code location
Test case
syz_thread_get_info(volatile int thread_id, volatile int packed_info_struct)
Backtrace upon hitting the bug
I would greatly appreciate it if you could kindly inform me of any mistakes in the previous issues.
Other additional context
No response
The text was updated successfully, but these errors were encountered: