[Bug 2035] psxcancel reveals NULL pointer access in _Thread_queue_Extract()
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Mon Mar 5 19:07:15 UTC 2012
https://www.rtems.org/bugzilla/show_bug.cgi?id=2035
Gedare <gedare at rtems.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gedare at rtems.org
--- Comment #1 from Gedare <gedare at rtems.org> 2012-03-05 13:07:15 CST ---
Is the test written properly? I find this function suspicious. Everything after
the while(1) loop is dead code...
void *countTaskAsync(void *ignored)
{
int i=0;
int type,state;
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &type);
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &state);
pthread_cleanup_push(countTask_cancel_handler, NULL);
while (1) {
printf("countTaskAsync: elapsed time (second): %2d\n", i++ );
sleep(1);
}
countTask_handler = false;
pthread_cleanup_pop(1);
if ( countTask_handler == false ){
puts("countTask_cancel_handler not executed");
rtems_test_exit(0);
}
}
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list