This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/81758] [OOP] Broken vtab


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

--- Comment #6 from DIL <liakhdi at ornl dot gov> ---
It is not that I am not willing to, I just do not see an easy way to reduce the
relevant code. For now, I have attached a debugger screenshot (jpg above) to
show you the details of the problem. The segfault occurs when running the
binary test_gfc.x produced by the Makefile, specifically in the GFC::graph test
(gfc_graph.F90). In the bottom left corner of the .JPG file you will see the
exact callstack at the point of crash. In the central window, you will see the
line 742 of gfc_vector.F90, specifically:
val_p => cep%get_value(errc)
The pointer "cep" is class(gfc_cont_elem_t) defined in gfc_base.F90. Now if you
look at the right window on the .JPG where I inspect the content of the "cep",
you will see a completely messed up _vptr table, where the type-bound procedure
bindings are associated with wrong procedures from a completely unrelated type
"vector_t" from gfc_vector.F90. In particular, if you look at the "get_value"
binding, that is, the procedure we are trying to call in line 742 above, you
will see that it is wrongly associated with vector_t%vectorlowerbound, a
totally unrelated type-bound procedure from a different type. That's exactly
why the segfault occurs (please see the callstack). All other type-bound
bindings of "cep" are wrong as well, except maybe few.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]