Advertisement
Guest User

Untitled

a guest
Aug 28th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. root@localhost:~# gdb ./test_egl core
  2. GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
  3. Copyright (C) 2012 Free Software Foundation, Inc.
  4. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  5. This is free software: you are free to change and redistribute it.
  6. There is NO WARRANTY, to the extent permitted by law. Type "show copying"
  7. and "show warranty" for details.
  8. This GDB was configured as "arm-linux-gnueabi".
  9. For bug reporting instructions, please see:
  10. <http://bugs.launchpad.net/gdb-linaro/>...
  11. Reading symbols from /root/test_egl...done.
  12. [New LWP 1506]
  13. [Thread debugging using libthread_db enabled]
  14. Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
  15. Core was generated by `./test_egl'.
  16. Program terminated with signal 11, Segmentation fault.
  17. #0 memset () at ../ports/sysdeps/arm/memset.S:42
  18. 42 ../ports/sysdeps/arm/memset.S: No such file or directory.
  19. (gdb) bt
  20. #0 memset () at ../ports/sysdeps/arm/memset.S:42
  21. #1 0x400366c8 in allocate_stack (stack=<synthetic pointer>,
  22. pdp=<synthetic pointer>, attr=0xbed5efb4) at allocatestack.c:397
  23. #2 __pthread_create_2_1 (newthread=0xbed5efcc, attr=0xbed5efb4,
  24. start_routine=0x402b79ad, arg=0x9ee830) at pthread_create.c:462
  25. #3 0x402b7ec8 in ?? ()
  26. #4 0x402b7ec8 in ?? ()
  27. Backtrace stopped: previous frame identical to this frame (corrupt stack?)
  28. (gdb)
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. static int my_pthread_attr_destroy(pthread_attr_t *__attr)
  37. {
  38. pthread_attr_t *realattr = (pthread_attr_t *) *(int *) __attr;
  39.  
  40. realattr = malloc(sizeof(pthread_attr_t));
  41. *((int *)__attr) = (int) realattr;
  42.  
  43. return pthread_attr_destroy(realattr);
  44. }
  45.  
  46. static int my_pthread_attr_setdetachstate(pthread_attr_t *__attr, int detachstate)
  47. {
  48. pthread_attr_t *realattr = (pthread_attr_t *) *(int *) __attr;
  49.  
  50. realattr = malloc(sizeof(pthread_attr_t));
  51. *((int *)__attr) = (int) realattr;
  52.  
  53.  
  54. return pthread_attr_setdetachstate(realattr, detachstate);
  55. }
  56.  
  57.  
  58. static int my_pthread_attr_setstacksize(pthread_attr_t *__attr, size_t stacksize)
  59. {
  60.  
  61. pthread_attr_t *realattr = (pthread_attr_t *) *(int *) __attr;
  62.  
  63. realattr = malloc(sizeof(pthread_attr_t));
  64. *((int *)__attr) = (int) realattr;
  65.  
  66. return pthread_attr_setstacksize (realattr,stacksize);
  67. }
  68.  
  69. static int my_pthread_attr_init(pthread_attr_t *__attr)
  70. {
  71. pthread_attr_t *realattr = (pthread_attr_t *) *(int *) __attr;
  72.  
  73. realattr = malloc(sizeof(pthread_attr_t));
  74. *((int *)__attr) = (int) realattr;
  75.  
  76. return pthread_attr_init(realattr);
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement