tags:

views:

150

answers:

2

We are trying to port our code from HPX to AIX but getting core dump while running exe.

its failing in some unknown function ptrgl_64._ptrgl.

> ptrgl_64._ptrgl() at 0x900000084da0e48
> dfile_Proc(o_record =
> 0x0000000400000004, fileType =
> "^O\377\377\377\377\377TH^O\377\377\377\377\377TQ^O\377\377\377\377\377Ta^O\377\377\377\377\377T}",
> dist_dest = (nil), indicator = '\0',
> i_acCounters = (nil)), line 621 in
> "DISTfile.c" main(i_argc = 4, i_argv =
> 0x0fffffffffff34e8), line 66 in
> "main_EXEC.c"

any idea about this issue?? Thanks in advance.

+1  A: 

ptrgl_64._ptrgl() at 0x900000084da0e48
dfile_Proc(o_record = 0x0000000400000004,
fileType ="^O\377\377\377\377\377TH^O\377\377\377\377\377TQ^O\377\377\377\377\377Ta^O\377\377\377\377\377T}",
dist_dest = (nil), indicator = '\0', i_acCounters = (nil)), line 621 in "DISTfile.c"
main(i_argc = 4, i_argv = 0x0fffffffffff34e8), line 66 in "main_EXEC.c"

Look at line 621 of DISTfile.c.
What is this line doing ?
Is it calling a function through a function pointer ?
What sort of problems might be caused by line 621 ?

codeDr
yes we are calling function through function pointer array.But what issue could be calused by function pointer?same code is working perfectly fine on HPX?I dont understand what is calling "ptrgl_64._ptrgl" function.I cant find any thing on the google for this function.
Hemant
thanks for your reply its was issue with function pointer only.
Hemant
+1  A: 

This is called pointer glue, and is used to call functions through a pointer on PowerPC. Because the pointer could point to a function in another module/shared object, the pointer glue is needed to set up the correct RTOC and environment pointer for that module and then jump to the function entry point. If the function pointer was not valid then it will likely crash in the pointer glue, since that is where the pointer is actually dereferenced.

See section A.3.3 of the PowerPC Compiler Writer's Guide if you are interested in the full details.

mark4o
Thanks mark it was the issue with the function pointer only.+1 for explanation of pointer glue.
Hemant