[Vortex] async connect issue on linux 2.4

Francis Brosnan Blazquez francis at aspl.es
Mon Oct 20 16:54:39 CEST 2008


Hi Martin!

> thanks, that's great. 

Good. I'll apply the patch.

> well you're right, it is really difficult to reporduce that situation,
> but the 
> issue basically indeed is letal! i think the problem consists when
> linking 
> vortex in a c-plus-plus program.
> the reason is the typedef definition of bool in 
> axl_decl.h.
> when vortex/axl is compiled, "bool" is not defined and thus typedefed
> to int 
> (4 bytes).
> when vortex.h and its dependend header files are included in a
> c-plus-plus 
> program, "bool" is defined and of size 1 byte! therefore a "bool"
> parameter - 
> in most cases - is interpreted as set ("true") regardless what the
> parameter 
> says.
> this issue in combination with the fixed on above results in a freed 
> VortexConnection after a vortex_connection_is_ok(conn, false) call and
> thats 
> why the sequencer sequentially crashes.

Ok, I see. Really good description Martin, it makes sense. 

One question: how did you solved this issue until now? Do you use 0 or 1
directly rather false or true?

In the other hand, I think this could it be solved by changing bool
definition to use char. This will cause vortex and axl build to use a
fixed single signed byte representation. It remains checking against a c
++ program but it should work. 

Another approach would be to remove the bool type definition from axl
and vortex API. This is something we had in mind for some time, but then
no more issues were found...maybe it is the moment to do so.

Let me know your opinion. Thanks Martin!

> cheers
> martin
-- 
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.



More information about the Vortex mailing list