Tcl-C program crashes in Tcl_CreateObjCommand










0















I got the following crash when I used my package I provided in some shell of tcl.
My package works good on every tcl shell that is running 64bit version , but when I am using this shell it crushes (the crush is when I am using my Tcl_C Api and the functions I created with it).



This is the backtrace of gdb debugger:



--- Stack trace follows:
at /u/my_user/workspace/user_prog/user_dev/tb/xtg_agent/xtg_agentpkg.sv, 15
Dumping VCS Annotated Stack:
#0 0x00002aaab50b286d in waitpid () from /lib64/libc.so.6
#1 0x00002aaab5044479 in do_system () from /lib64/libc.so.6
#2 0x00002aaab50447b0 in system () from /lib64/libc.so.6
#3 0x00002aaaae421dab in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313e639d2928478c79b3f673f99203bcf8be64600612100082236bffb2007f1e0ef9 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#4 0x00002aaaae4237b6 in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313efba706aab251478fa49e66610e453774633a6c152e7ef778f2202cda681f3d4e () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#5 0x00002aaaae41c885 in le_d35ca1ff70d465c2b9b1a72eee90a506fdd009d3de3db1de () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#6 0x00002aaab0c23458 in le_64133461705005bb725549e2e6fa1b3f () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#7 0x00002aaab0a84bee in le_82244d58c54c18c70d63edc9becab634 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#9 0x00002aaab5038495 in raise () from /lib64/libc.so.6
#10 0x00002aaab5039c75 in abort () from /lib64/libc.so.6
#11 0x00002aaaaed93a7d in Tcl_PanicVA () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#12 0x00002aaaaed93b3d in Tcl_Panic () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#13 0x00002aaaaedaf227 in Ptr2Block () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#14 0x00002aaaaedaf80b in TclpFree () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#15 0x00002aaaaeccba9c in Tcl_DeleteCommandFromToken () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#16 0x00002aaaaeccc12d in Tcl_CreateObjCommand () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#17 0x00002aaacf446f31 in Tclprogapi_Init (interp=0x8f5410) at /u/my_user/workspace/user_prog/user_dev/uapi/PROG_TCL.cpp:67
...


there are additional lines but they just tracing to another files that are not related to the TCL_C API or to the system files.



I am thinking it has something to do with the shared object of the API that this shell has (maybe some old version that not support Objects).










share|improve this question






















  • The crash is inside the deleting of an existing command (so that your new commands can replace it) and looks like it is probably caused by some sort of memory corruption. Somewhere. Memory corruption bugs aren't the easiest to hunt. Can you do a build with a tool like electricfence or purify?

    – Donal Fellows
    Nov 15 '18 at 11:52











  • You are going to need to look at your custom object source code and find the ref count incr/decr bug that is causing the bad memory ref.

    – MoDJ
    Nov 15 '18 at 21:47















0















I got the following crash when I used my package I provided in some shell of tcl.
My package works good on every tcl shell that is running 64bit version , but when I am using this shell it crushes (the crush is when I am using my Tcl_C Api and the functions I created with it).



This is the backtrace of gdb debugger:



--- Stack trace follows:
at /u/my_user/workspace/user_prog/user_dev/tb/xtg_agent/xtg_agentpkg.sv, 15
Dumping VCS Annotated Stack:
#0 0x00002aaab50b286d in waitpid () from /lib64/libc.so.6
#1 0x00002aaab5044479 in do_system () from /lib64/libc.so.6
#2 0x00002aaab50447b0 in system () from /lib64/libc.so.6
#3 0x00002aaaae421dab in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313e639d2928478c79b3f673f99203bcf8be64600612100082236bffb2007f1e0ef9 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#4 0x00002aaaae4237b6 in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313efba706aab251478fa49e66610e453774633a6c152e7ef778f2202cda681f3d4e () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#5 0x00002aaaae41c885 in le_d35ca1ff70d465c2b9b1a72eee90a506fdd009d3de3db1de () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#6 0x00002aaab0c23458 in le_64133461705005bb725549e2e6fa1b3f () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#7 0x00002aaab0a84bee in le_82244d58c54c18c70d63edc9becab634 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#9 0x00002aaab5038495 in raise () from /lib64/libc.so.6
#10 0x00002aaab5039c75 in abort () from /lib64/libc.so.6
#11 0x00002aaaaed93a7d in Tcl_PanicVA () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#12 0x00002aaaaed93b3d in Tcl_Panic () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#13 0x00002aaaaedaf227 in Ptr2Block () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#14 0x00002aaaaedaf80b in TclpFree () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#15 0x00002aaaaeccba9c in Tcl_DeleteCommandFromToken () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#16 0x00002aaaaeccc12d in Tcl_CreateObjCommand () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#17 0x00002aaacf446f31 in Tclprogapi_Init (interp=0x8f5410) at /u/my_user/workspace/user_prog/user_dev/uapi/PROG_TCL.cpp:67
...


there are additional lines but they just tracing to another files that are not related to the TCL_C API or to the system files.



I am thinking it has something to do with the shared object of the API that this shell has (maybe some old version that not support Objects).










share|improve this question






















  • The crash is inside the deleting of an existing command (so that your new commands can replace it) and looks like it is probably caused by some sort of memory corruption. Somewhere. Memory corruption bugs aren't the easiest to hunt. Can you do a build with a tool like electricfence or purify?

    – Donal Fellows
    Nov 15 '18 at 11:52











  • You are going to need to look at your custom object source code and find the ref count incr/decr bug that is causing the bad memory ref.

    – MoDJ
    Nov 15 '18 at 21:47













0












0








0








I got the following crash when I used my package I provided in some shell of tcl.
My package works good on every tcl shell that is running 64bit version , but when I am using this shell it crushes (the crush is when I am using my Tcl_C Api and the functions I created with it).



This is the backtrace of gdb debugger:



--- Stack trace follows:
at /u/my_user/workspace/user_prog/user_dev/tb/xtg_agent/xtg_agentpkg.sv, 15
Dumping VCS Annotated Stack:
#0 0x00002aaab50b286d in waitpid () from /lib64/libc.so.6
#1 0x00002aaab5044479 in do_system () from /lib64/libc.so.6
#2 0x00002aaab50447b0 in system () from /lib64/libc.so.6
#3 0x00002aaaae421dab in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313e639d2928478c79b3f673f99203bcf8be64600612100082236bffb2007f1e0ef9 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#4 0x00002aaaae4237b6 in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313efba706aab251478fa49e66610e453774633a6c152e7ef778f2202cda681f3d4e () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#5 0x00002aaaae41c885 in le_d35ca1ff70d465c2b9b1a72eee90a506fdd009d3de3db1de () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#6 0x00002aaab0c23458 in le_64133461705005bb725549e2e6fa1b3f () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#7 0x00002aaab0a84bee in le_82244d58c54c18c70d63edc9becab634 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#9 0x00002aaab5038495 in raise () from /lib64/libc.so.6
#10 0x00002aaab5039c75 in abort () from /lib64/libc.so.6
#11 0x00002aaaaed93a7d in Tcl_PanicVA () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#12 0x00002aaaaed93b3d in Tcl_Panic () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#13 0x00002aaaaedaf227 in Ptr2Block () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#14 0x00002aaaaedaf80b in TclpFree () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#15 0x00002aaaaeccba9c in Tcl_DeleteCommandFromToken () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#16 0x00002aaaaeccc12d in Tcl_CreateObjCommand () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#17 0x00002aaacf446f31 in Tclprogapi_Init (interp=0x8f5410) at /u/my_user/workspace/user_prog/user_dev/uapi/PROG_TCL.cpp:67
...


there are additional lines but they just tracing to another files that are not related to the TCL_C API or to the system files.



I am thinking it has something to do with the shared object of the API that this shell has (maybe some old version that not support Objects).










share|improve this question














I got the following crash when I used my package I provided in some shell of tcl.
My package works good on every tcl shell that is running 64bit version , but when I am using this shell it crushes (the crush is when I am using my Tcl_C Api and the functions I created with it).



This is the backtrace of gdb debugger:



--- Stack trace follows:
at /u/my_user/workspace/user_prog/user_dev/tb/xtg_agent/xtg_agentpkg.sv, 15
Dumping VCS Annotated Stack:
#0 0x00002aaab50b286d in waitpid () from /lib64/libc.so.6
#1 0x00002aaab5044479 in do_system () from /lib64/libc.so.6
#2 0x00002aaab50447b0 in system () from /lib64/libc.so.6
#3 0x00002aaaae421dab in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313e639d2928478c79b3f673f99203bcf8be64600612100082236bffb2007f1e0ef9 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#4 0x00002aaaae4237b6 in le_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313efba706aab251478fa49e66610e453774633a6c152e7ef778f2202cda681f3d4e () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#5 0x00002aaaae41c885 in le_d35ca1ff70d465c2b9b1a72eee90a506fdd009d3de3db1de () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/liberrorinf.so
#6 0x00002aaab0c23458 in le_64133461705005bb725549e2e6fa1b3f () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#7 0x00002aaab0a84bee in le_82244d58c54c18c70d63edc9becab634 () from /global/apps/vcsmx_2017.03-SP2-7-Z/linux64/lib/libvcsnew.so
#9 0x00002aaab5038495 in raise () from /lib64/libc.so.6
#10 0x00002aaab5039c75 in abort () from /lib64/libc.so.6
#11 0x00002aaaaed93a7d in Tcl_PanicVA () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#12 0x00002aaaaed93b3d in Tcl_Panic () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#13 0x00002aaaaedaf227 in Ptr2Block () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#14 0x00002aaaaedaf80b in TclpFree () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#15 0x00002aaaaeccba9c in Tcl_DeleteCommandFromToken () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#16 0x00002aaaaeccc12d in Tcl_CreateObjCommand () from /u/my_user/workspace/user_prog/user_dev/utils/tcl8.6.6/lib/libtcl8.6.so
#17 0x00002aaacf446f31 in Tclprogapi_Init (interp=0x8f5410) at /u/my_user/workspace/user_prog/user_dev/uapi/PROG_TCL.cpp:67
...


there are additional lines but they just tracing to another files that are not related to the TCL_C API or to the system files.



I am thinking it has something to do with the shared object of the API that this shell has (maybe some old version that not support Objects).







api crash tcl






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 8:17









ms_studms_stud

579




579












  • The crash is inside the deleting of an existing command (so that your new commands can replace it) and looks like it is probably caused by some sort of memory corruption. Somewhere. Memory corruption bugs aren't the easiest to hunt. Can you do a build with a tool like electricfence or purify?

    – Donal Fellows
    Nov 15 '18 at 11:52











  • You are going to need to look at your custom object source code and find the ref count incr/decr bug that is causing the bad memory ref.

    – MoDJ
    Nov 15 '18 at 21:47

















  • The crash is inside the deleting of an existing command (so that your new commands can replace it) and looks like it is probably caused by some sort of memory corruption. Somewhere. Memory corruption bugs aren't the easiest to hunt. Can you do a build with a tool like electricfence or purify?

    – Donal Fellows
    Nov 15 '18 at 11:52











  • You are going to need to look at your custom object source code and find the ref count incr/decr bug that is causing the bad memory ref.

    – MoDJ
    Nov 15 '18 at 21:47
















The crash is inside the deleting of an existing command (so that your new commands can replace it) and looks like it is probably caused by some sort of memory corruption. Somewhere. Memory corruption bugs aren't the easiest to hunt. Can you do a build with a tool like electricfence or purify?

– Donal Fellows
Nov 15 '18 at 11:52





The crash is inside the deleting of an existing command (so that your new commands can replace it) and looks like it is probably caused by some sort of memory corruption. Somewhere. Memory corruption bugs aren't the easiest to hunt. Can you do a build with a tool like electricfence or purify?

– Donal Fellows
Nov 15 '18 at 11:52













You are going to need to look at your custom object source code and find the ref count incr/decr bug that is causing the bad memory ref.

– MoDJ
Nov 15 '18 at 21:47





You are going to need to look at your custom object source code and find the ref count incr/decr bug that is causing the bad memory ref.

– MoDJ
Nov 15 '18 at 21:47












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53315026%2ftcl-c-program-crashes-in-tcl-createobjcommand%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53315026%2ftcl-c-program-crashes-in-tcl-createobjcommand%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3

Museum of Modern and Contemporary Art of Trento and Rovereto