Artifacts Associated With Ticket 6eb8d79cb8
Ticket change [58327a8c09] (rid 225192) by dgp on 2024-04-22 15:44:29:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
(gdb) run ../tests/obj.test -match obj-34.1 -verbose bpste ... ---- obj-34.1 start Program received signal SIGSEGV, Segmentation fault. 0x000000000042676f in TestbignumobjCmd (dummy159=0x0, interp=0x8f2870, objc=4, objv=0x8f7658) at /home/dgp/fossil/tcl8.7/generic/tclTestObj.c:197 197 if (mp_init(&bignumValue) != MP_OKAY) { Missing separate debuginfos, use: debuginfo-install glibc-2.17-326.el7_9.x86_64 zlib-1.2.7-21.el7_9.x86_64 (gdb) bt #0 0x000000000042676f in TestbignumobjCmd (dummy159=0x0, interp=0x8f2870, objc=4, objv=0x8f7658) at /home/dgp/fossil/tcl8.7/generic/tclTestObj.c:197 #1 0x00000000004359ab in Dispatch (data=0x9e0108, interp=0x8f2870, dummy4913=0) at /home/dgp/fossil/tcl8.7/generic/tclBasic.c:4951 #2 0x0000000000435a39 in TclNRRunCallbacks (interp=0x8f2870, result=0, rootPtr=0x0) at /home/dgp/fossil/tcl8.7/generic/tclBasic.c:4991 #3 0x000000000043519b in Tcl_EvalObjv (interp=0x8f2870, objc=6, objv=0x8f6b60, flags=2097168) at /home/dgp/fossil/tcl8.7/generic/tclBasic.c:4710 #4 0x0000000000437b94 in TclEvalEx (interp=0x8f2870, script=0x99e4f0 "# Functionality covered: this file contains a collection of tests for the\n# procedures in tclObj.c that implement Tcl's basic type support and the\n# type managers for the types boolean, double, and in"..., numBytes=22788, flags=0, line=582, clNextOuter=0x0, outerScript=0x99e4f0 "# Functionality covered: this file contains a collection of tests for the\n# procedures in tclObj.c that implement Tcl's basic type support and the\n# type managers for the types boolean, double, and in"...) at /home/dgp/fossil/tcl8.7/generic/tclBasic.c:5868 #5 0x000000000056b2d8 in Tcl_FSEvalFileEx (interp=0x8f2870, pathPtr=0x93ea90, encodingName=0x64707c "utf-8") at /home/dgp/fossil/tcl8.7/generic/tclIOUtil.c:1794 #6 0x0000000000578250 in Tcl_MainEx (argc=-1, argv=0x7fffffffcea8, appInitProc=0x410210 <Tcl_AppInit>, interp=0x8f2870) at /home/dgp/fossil/tcl8.7/generic/tclMain.c:404 #7 0x0000000000410209 in main (argc=6, argv=0x7fffffffcea8) at /home/dgp/fossil/tcl8.7/unix/tclAppInit.c:94 - foundin initialized to: "8.7"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- private_contact initialized to: "8e2300e85be5dd1445b9666eb9429055951e33be"
- resolution initialized to: "None"
- severity initialized to: "Critical"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "10. Objects"
- title initialized to: "segfault in obj-34.1"
- type initialized to: "Bug"
Ticket change [8f698476f9] (rid 225193) by dgp on 2024-04-22 15:49:33:
- icomment:
Problem showed up with the TIP 648 implementation.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [075c82a41e] (rid 225194) by jan.nijtmans on 2024-04-22 16:05:16:
- assignee changed to: "jan.nijtmans"
- icomment: "Yes, I'm aware of it. Working on it ...."
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [1f043fbde6] (rid 225202) by jan.nijtmans on 2024-04-22 16:30:49:
- closedate changed to: "2460423.18807326"
- closer changed to: "jan.nijtmans"
- icomment: "Fixed [59010ad4e622eba1|here]"
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [813277b921] (rid 225219) by apnadkarni on 2024-04-23 02:41:10:
- closedate changed to: "2460423.61192267"
- closer changed to: "apnadkarni"
- icomment:
Question from an extension writer's perspective - does an extension also need to call `Tcl_TomMath_InitStubs` (if it uses tommath routines) ? If so, how does it know if Tcl was built with `TCL_WITH_EXTERNAL_TOMMATH` or not? /Ashok
- login: "apnadkarni"
- mimetype: "text/x-markdown"
Ticket change [ca212f317a] (rid 225220) by apnadkarni on 2024-04-23 02:43:16:
- closedate changed to: "2460423.61338918"
- icomment:
OT: Curiously, the ticket summary above shows Closed by: apnadkarni. I am pretty sure I did not change the Status field in my previous edit.
- login: "apnadkarni"
- mimetype: "text/plain"
Ticket change [30e3178c14] (rid 225224) by jan.nijtmans on 2024-04-23 05:46:16:
- closedate changed to: "2460423.74047137"
- closer changed to: "jan.nijtmans"
- icomment:
> does an extension also need to call `Tcl_TomMath_InitStubs` (if it uses tommath routines) The extension needs to call `Tcl_TomMath_InitStubs` if it included `<tclTomMath.h>` (Method 1). It doesn't need to call `Tcl_TomMath_InitStubs` if it includes `<tommath.h>` (Method 2, but the it has to link with the libtommath library itself, `-ltommath`). The extension can freely choose what it wants. The disadvantage of Method 2 is that the extension loses 8.6-compatibility. Therefore I guess most most extensions will continue to use Method 1.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [61fbbdf967] (rid 225226) by apnadkarni on 2024-04-23 06:45:45:
- closedate changed to: "2460423.781781"
- closer changed to: "apnadkarni"
- icomment:
Tx for clarifying but that raises another question. Will there be any issues if Tcl is built using its own libtommath (or libtommath.dll on Windows) and the extension uses the system libtommath? Or vice versa? I've taken the liberty of adding your comment to the migration [wiki page](https://core.tcl-lang.org/tcl/wiki?name=Migrating%20C%20extensions%20to%20Tcl%209)
- login: "apnadkarni"
- mimetype: "text/x-markdown"
Ticket change [169fa69de3] (rid 225227) by jan.nijtmans on 2024-04-23 08:52:08:
- closedate changed to: "2460423.86954424"
- closer changed to: "jan.nijtmans"
- icomment:
> Will there be any issues ... The thing to watch for is 2 different libtommath's in the same process. If Tcl is built with an external libtommath that cannot happen. If the extension is using stubs that cannot happen. But if Tcl uses its internal libtommath, and the extension uses an external libtommath, that's when problems should be expected. 1) The internal and external libtommath could be compiled differently, MP_32BIT vs MP_64BIT. 2) And they can use different allocators (ckalloc vs malloc). Exchanging mp_int's between the two library will give unexpected results.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"