daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/src/core/fixedsizealloc.c b/src/core/fixedsizealloc.c
  2. index 21f89a4..78a0ff0 100644
  3. --- a/src/core/fixedsizealloc.c
  4. +++ b/src/core/fixedsizealloc.c
  5. @@ -10,7 +10,7 @@
  6.   * behavior. */
  7.  
  8.  /* Turn this on to switch to a mode where we debug by size. */
  9. -#define FSA_SIZE_DEBUG 0
  10. +#define FSA_SIZE_DEBUG 1
  11.  #if FSA_SIZE_DEBUG
  12.  typedef struct {
  13.      MVMuint64 alloc_size;
  14. @@ -231,7 +231,7 @@ void * MVM_fixed_size_realloc(MVMThreadContext *tc, MVMFixedSizeAlloc *al, void
  15.  void * MVM_fixed_size_realloc_at_safepoint(MVMThreadContext *tc, MVMFixedSizeAlloc *al, void * p, size_t old_bytes, size_t new_bytes) {
  16.  #if FSA_SIZE_DEBUG
  17.      MVMFixedSizeAllocDebug *dbg = MVM_fixed_size_alloc(tc, al, new_bytes);
  18. -    memcpy(dbg->memory, (char *)p + sizeof(MVMuint64), new_bytes > old_bytes ? old_bytes : new_bytes);
  19. +    memcpy(dbg->memory, (char *)p, new_bytes > old_bytes ? old_bytes : new_bytes);
  20.      MVM_fixed_size_free_at_safepoint(tc, al, old_bytes, p);
  21.      dbg->alloc_size = new_bytes;
  22.      return &(dbg->memory);
  23.  
  24. dogbert@dogbert-VirtualBox ~/repos/rakudo/nqp $ valgrind /home/dogbert/repos/rakudo/install/bin/moar nqp.moarvm t/p5regex/01-p5regex.t
  25. ==20003== Memcheck, a memory error detector
  26. ==20003== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
  27. ==20003== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
  28. ==20003== Command: /home/dogbert/repos/rakudo/install/bin/moar nqp.moarvm t/p5regex/01-p5regex.t
  29. ==20003==
  30. # file: rx_basic
  31. ok 1 - basic literal
  32. ok 2 - basic multichar literal
  33. ok 3 - basic dot
  34. ok 4 - basic multidot
  35. ok 5 - dot in mid pattern
  36. ok 6 - failed literal match
  37. ok 7 - failed literal match
  38. ok 8 - failed dot match
  39. ok 9 - scanning match
  40. # done with file rx_basic
  41. # file: rx_quantifiers
  42. ok 10 - star 2+
  43. ok 11 - star 1
  44. ok 12 - star 0
  45. ok 13 - star 2+
  46. ok 14 - star 1
  47. ok 15 - star 0
  48. ok 16 - plus 2+
  49. ok 17 - plus 1
  50. ==20003== Conditional jump or move depends on uninitialised value(s)
  51. ==20003==    at 0x4C324BD: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  52. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  53. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  54. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  55. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  56. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  57. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  58. ==20003==    by 0x40121A: main (main.c:299)
  59. ==20003==
  60. ==20003== Conditional jump or move depends on uninitialised value(s)
  61. ==20003==    at 0x4C3277C: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  62. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  63. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  64. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  65. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  66. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  67. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  68. ==20003==    by 0x40121A: main (main.c:299)
  69. ==20003==
  70. ==20003== Conditional jump or move depends on uninitialised value(s)
  71. ==20003==    at 0x4C3251E: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  72. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  73. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  74. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  75. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  76. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  77. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  78. ==20003==    by 0x40121A: main (main.c:299)
  79. ==20003==
  80. ==20003== Conditional jump or move depends on uninitialised value(s)
  81. ==20003==    at 0x4C3252F: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  82. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  83. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  84. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  85. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  86. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  87. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  88. ==20003==    by 0x40121A: main (main.c:299)
  89. ==20003==
  90. ==20003== Conditional jump or move depends on uninitialised value(s)
  91. ==20003==    at 0x4C32545: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  92. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  93. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  94. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  95. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  96. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  97. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  98. ==20003==    by 0x40121A: main (main.c:299)
  99. ==20003==
  100. ==20003== Conditional jump or move depends on uninitialised value(s)
  101. ==20003==    at 0x4C32678: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  102. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  103. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  104. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  105. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  106. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  107. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  108. ==20003==    by 0x40121A: main (main.c:299)
  109. ==20003==
  110. ==20003== Use of uninitialised value of size 8
  111. ==20003==    at 0x4C326CB: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  112. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  113. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  114. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  115. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  116. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  117. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  118. ==20003==    by 0x40121A: main (main.c:299)
  119. ==20003==
  120. ==20003== Invalid write of size 8
  121. ==20003==    at 0x4C326CB: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  122. ==20003==    by 0x50340CD: memcpy (string3.h:53)
  123. ==20003==    by 0x50340CD: MVM_fixed_size_realloc_at_safepoint (fixedsizealloc.c:234)
  124. ==20003==    by 0x50866E9: MVM_sc_add_all_scs_entry (sc.c:71)
  125. ==20003==    by 0x5086B0F: MVM_sc_create (sc.c:11)
  126. ==20003==    by 0x50051FC: MVM_interp_run (interp.c:3023)
  127. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  128. ==20003==    by 0x40121A: main (main.c:299)
  129. ==20003==  Address 0x8895d90 is 0 bytes after a block of size 48 alloc'd
  130. ==20003==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  131. ==20003==    by 0x50AB6B6: MVM_calloc (alloc.h:11)
  132. ==20003==    by 0x50AB6B6: sim_stack_push (stats.c:250)
  133. ==20003==    by 0x50AC0A0: MVM_spesh_stats_update (stats.c:535)
  134. ==20003==    by 0x50AA838: worker (worker.c:16)
  135. ==20003==    by 0x50276E0: thread_initial_invoke (threads.c:59)
  136. ==20003==    by 0x5003A1D: MVM_interp_run (interp.c:93)
  137. ==20003==    by 0x5027765: start_thread (threads.c:87)
  138. ==20003==    by 0x5E756B9: start_thread (pthread_create.c:333)
  139. ==20003==
  140. ==20003== Use of uninitialised value of size 8
  141. ==20003==    at 0x50181DF: MVM_interp_run (interp.c:3035)
  142. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  143. ==20003==    by 0x40121A: main (main.c:299)
  144. ==20003==
  145. ==20003== Invalid read of size 8
  146. ==20003==    at 0x50181DF: MVM_interp_run (interp.c:3035)
  147. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  148. ==20003==    by 0x40121A: main (main.c:299)
  149. ==20003==  Address 0x8888bf0 is 16 bytes before a block of size 32 alloc'd
  150. ==20003==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  151. ==20003==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  152. ==20003==    by 0x50AB07E: MVM_realloc (alloc.h:20)
  153. ==20003==    by 0x50AB07E: by_type (stats.c:107)
  154. ==20003==    by 0x50ABA74: incorporate_stats (stats.c:301)
  155. ==20003==    by 0x50AC0E5: MVM_spesh_stats_update (stats.c:602)
  156. ==20003==    by 0x50AA838: worker (worker.c:16)
  157. ==20003==    by 0x50276E0: thread_initial_invoke (threads.c:59)
  158. ==20003==    by 0x5003A1D: MVM_interp_run (interp.c:93)
  159. ==20003==    by 0x5027765: start_thread (threads.c:87)
  160. ==20003==    by 0x5E756B9: start_thread (pthread_create.c:333)
  161. ==20003==
  162. ==20003== Use of uninitialised value of size 8
  163. ==20003==    at 0x5004E05: MVM_sc_get_collectable_sc (sc.h:78)
  164. ==20003==    by 0x5004E05: MVM_sc_get_obj_sc (sc.h:83)
  165. ==20003==    by 0x5004E05: MVM_interp_run (interp.c:3117)
  166. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  167. ==20003==    by 0x40121A: main (main.c:299)
  168. ==20003==
  169. ==20003== Invalid read of size 8
  170. ==20003==    at 0x5004E05: MVM_sc_get_collectable_sc (sc.h:78)
  171. ==20003==    by 0x5004E05: MVM_sc_get_obj_sc (sc.h:83)
  172. ==20003==    by 0x5004E05: MVM_interp_run (interp.c:3117)
  173. ==20003==    by 0x50F8553: MVM_vm_run_file (moar.c:407)
  174. ==20003==    by 0x40121A: main (main.c:299)
  175. ==20003==  Address 0x8888bf0 is 16 bytes before a block of size 32 alloc'd
  176. ==20003==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  177. ==20003==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  178. ==20003==    by 0x50AB07E: MVM_realloc (alloc.h:20)
  179. ==20003==    by 0x50AB07E: by_type (stats.c:107)
  180. ==20003==    by 0x50ABA74: incorporate_stats (stats.c:301)
  181. ==20003==    by 0x50AC0E5: MVM_spesh_stats_update (stats.c:602)
  182. ==20003==    by 0x50AA838: worker (worker.c:16)
  183. ==20003==    by 0x50276E0: thread_initial_invoke (threads.c:59)
  184. ==20003==    by 0x5003A1D: MVM_interp_run (interp.c:93)
  185. ==20003==    by 0x5027765: start_thread (threads.c:87)
  186. ==20003==    by 0x5E756B9: start_thread (pthread_create.c:333)
  187. ==20003==
  188. not ok 18 - plus 0
  189. # ERROR: Object of type NQPRegex in QAST::WVal, but not in SC
  190. not ok 19 - plus 2+
  191. MoarVM panic: Spesh arg guard: unimplemented sparse guard case
  192. ==20003==
  193. ==20003== HEAP SUMMARY:
  194. ==20003==     in use at exit: 24,601,456 bytes in 75,518 blocks
  195. ==20003==   total heap usage: 296,031 allocs, 220,513 frees, 92,300,717 bytes allocated
  196. ==20003==
  197. ==20003== LEAK SUMMARY:
  198. ==20003==    definitely lost: 0 bytes in 0 blocks
  199. ==20003==    indirectly lost: 0 bytes in 0 blocks
  200. ==20003==      possibly lost: 808,000 bytes in 14,413 blocks
  201. ==20003==    still reachable: 23,793,456 bytes in 61,105 blocks
  202. ==20003==                       of which reachable via heuristic:
  203. ==20003==                         length64           : 512,720 bytes in 7,591 blocks
  204. ==20003==         suppressed: 0 bytes in 0 blocks
  205. ==20003== Rerun with --leak-check=full to see details of leaked memory
  206. ==20003==
  207. ==20003== For counts of detected and suppressed errors, rerun with: -v
  208. ==20003== Use --track-origins=yes to see where uninitialised values come from
  209. ==20003== ERROR SUMMARY: 49 errors from 12 contexts (suppressed: 0 from 0)
RAW Paste Data
Top