Thanks, that was helpful.

Setting breakpoint in shared object gives an error:
Error accessing memory address 0x1000842d: Input/Output error.

I've changed tree-plugin-pass.c - disabled lazy so loading.
  //handle = dlopen (plugin_name, RTLD_LAZY);
  // Tarmo: Fix
  handle = dlopen (plugin_name, 2 /*Load now*/);

After that setting breakpoint work. (yes!)

Now I'm in gcc trees. "Display" operation helps a lot.

Located now exact place where it crashes - using gcc_print.js on my
own code.

(gdb) backtrace
#0  type_as_string (typ=0x7fe14c60, flags=0) at util.c:85
#1  0x1a6d8407 in dehydra_typeString (type=0x7fe14c60) at
dehydra_types.c:465
#2  0x1a6d7345 in dehydra_attachClassName (this=0x1a7c0010,
obj=0x1fd0e90, type=0x7fe14c60) at dehydra_types.c:215
#3  0x1a6d7b67 in dehydra_convert2 (this=0x1a7c0010, type=0x7fe14c60,
obj=0x1fd0e90) at dehydra_types.c:339
#4  0x1a6d76bd in dehydra_convert (this=0x1a7c0010, type=0x7fe14c60)
at dehydra_types.c:271
#5  0x1a6d83ec in dehydra_convertType (this=0x1a7c0010,
type=0x7fe14c60) at dehydra_types.c:455
#6  0x1a6d5783 in dehydra_addVar (this=0x1a7c0010, v=0x7fe32c40,
parentArray=0x1fd0e78) at dehydra.c:441
#7  0x1a6d3dc2 in statement_walker (tp=0x22bfe4,
walk_subtrees=0x22bf70, data=0x1a7c0010) at dehydra_ast.c:272
#8  0x006e93c1 in walk_tree_1 (tp=0x22bfe4, func=0x1a6d370e
<statement_walker>, data=0x1a7c0010, pset=0x1fef950, lh=0x5e84d5
<cp_walk_subtrees>) at ../../gcc-4.3.0/gcc/tree.c:8391
#9  0x006eb209 in walk_tree_without_duplicates_1 (tp=0x22bfe4,
func=0x1a6d370e <statement_walker>, data=0x1a7c0010, lh=0x5e84d5
<cp_walk_subtrees>) at ../../gcc-4.3.0/gcc/tree.c:8657
#10 0x1a6d3038 in dehydra_makeVar (this=0x1a7c0010, t=0x7ff408c0,
prop=0x0, attachToObj=0x0) at dehydra_ast.c:29
#11 0x1a6d3d01 in statement_walker (tp=0x7ff4092c,
walk_subtrees=0x22c0a0, data=0x1a7c0010) at dehydra_ast.c:261
...

type_as_string tries to access type.type.name.identifier.id.str - and
it's location is invalid.
Could be somehow related to structures alignment - may be aligned
sligly differently than in linux ?

graph print (int)((void*)&typ->type.name->identifier.id.str - (void*)
typ)
 = 124

Btw - type_as_string is declared in util.c and in gcc/error.c - why
duplicated ?

Debugging deeper...
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to