idlc file generation with the latest version of the core library
mermakov opened this issue · 1 comments
mermakov commented
Hello!
I've tried to run idlc
build with the latest version of the core library (https://github.com/eclipse-cyclonedds/cyclonedds) and the current master of this repo and there seems to an issue causing a segmentation fault.
$ cd <A>/cyclonedds
$ git rev-parse HEAD
d6684dc96e7ef092869688358753e49e33e9bbc2
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=../install ..
$ cmake --build .
$ make install
...
$ cd <B>/cyclonedds-python
$ git rev-parse HEAD
8fb9d0d65500c9597fa6e6240b40498cb6120885
$ virtualenv .venv
$ source .venv/bin/activate
$ CYCLONEDDS_HOME=<A>/cyclonedds/install pip install .
foo.idl
with a simple definition:
struct foo {
long x;
};
$ cd whatever
$ source <B>/cyclonedds-python/.venv/bin/activate
$ gdb --args <A>/cyclonedds/install/bin/idlc -l py foo.idl
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from <A>/cyclonedds/install/bin/idlc...
(gdb) r
Starting program: <A>/cyclonedds/install/bin/idlc -l py foo.idl
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after vfork from child process 4118510]
No default extensibility provided. For one or more of the aggregated types in the IDL the extensibility is not explicitly set. Currently the default extensibility for these types is 'final', but this may change to 'appendable' in a future release because that is the default in the DDS XTypes specification.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f68fe3 in generate (pstate=0x5555555ee160, config=0x7fffffffdc10) at idlpy/src/generator.c:45
45 path = pstate->sources->path->name;
(gdb) p pstate->sources
$1 = (idl_source_t *) 0x0
(gdb) bt
#0 0x00007ffff7f68fe3 in generate (pstate=0x5555555ee160, config=0x7fffffffdc10) at idlpy/src/generator.c:45
#1 0x000055555555a9c6 in main (argc=4, argv=0x7fffffffdd58) at <A>/cyclonedds/src/tools/idlc/src/idlc/idlc.c:799
The same works with main
Python branch and 0.10.3
version of the native library fine.
mermakov commented
OK, I think I messed something up during installation, can no longer reproduce this, sorry.