tbodt / v8py

Write Python APIs, then call them from JavaScript using the V8 engine.
GNU Lesser General Public License v3.0
443 stars 29 forks source link

SegFault in Debugger #23

Closed armudgal closed 6 years ago

armudgal commented 6 years ago

Hi, the infinite recursion problem was solved but I am facing other problem.

$ thug -u win7ie90 -ld samples/misc/test1.html [2018-05-17 23:09:15] <script type="text/javascript">
      strVar = "one";
      myVar = eval("strVar");
      alert(myVar);
    </script>
[2018-05-17 23:09:15] 
      strVar = "one";
      myVar = eval("strVar");
      alert(myVar);

Received signal 11 SEGV_MAPERR ffffffffffffffd0

==== C stack trace ===============================

 [0x7f0ca9517781]
 [0x7f0cb4edaf20]
 [0x7f0ca8bab5e8]
 [0x5646ae7e82b8]
 [0x5646ae75f33e]
 [0x5646ae77f360]
 [0x5646ae81de59]
 [0x5646ae77af60]
 [0x5646ae7738ca]
 [0x5646ae78f1a9]
 [0x5646ae7a778e]
 [0x5646ae77af60]
 [0x5646ae7738ca]
 [0x5646ae78f1a9]
 [0x5646ae7a778e]
 [0x5646ae7a733a]
 [0x5646ae7644ab]
 [0x5646ae77af60]
 [0x5646ae77ad72]
 [0x5646ae7738ca]
 [0x5646ae77b24e]
 [0x5646ae77ad72]
 [0x5646ae77ad72]
 [0x5646ae7738ca]
 [0x5646ae77b24e]
 [0x5646ae7738ca]
 [0x5646ae77b24e]
 [0x5646ae77ad72]
 [0x5646ae77ad72]
 [0x5646ae77ad72]
 [0x5646ae77ad72]
 [0x5646ae7738ca]
 [0x5646ae78f1a9]
 [0x5646ae7a778e]
 [0x5646ae75f33e]
 [0x5646ae802d83]
 [0x5646ae77af60]
 [0x5646ae77ad72]
 [0x5646ae7738ca]
 [0x5646ae7731e9]
 [0x5646ae7a3bdf]
 [0x5646ae79e952]
 [0x5646ae79ddcd]
 [0x5646ae74d58b]
 [0x7f0cb4ebdb97]
 [0x5646ae74ce0a]
[end of stack trace]
Segmentation fault (core dumped)
tbodt commented 6 years ago

I'm afraid that's not enough to reproduce or diagnose the problem. Do you have a minimal repro case?

armudgal commented 6 years ago

I am afraid I was passing the wrong parameters to the Context().

tbodt commented 6 years ago

What was the wrong context parameter? It shouldn't be possible to cause a segfault with wrong parameters.

armudgal commented 6 years ago

Sorry for the english, not the wrong parameter, but an object. This was the key https://github.com/tbodt/v8py/issues/11.