Segmentation fault error when compile

Post Reply
nduvnjak
Posts: 40
Joined: Wed Feb 06, 2008 3:45 pm

Segmentation fault error when compile

Post by nduvnjak »

Hi,
we are getting this error when trying t compile a certain vortex module on Linux, under Texis 7.x :

-bash-4.1$ texis -ci -log "" -force -module parsephpbb parsephpbb
Segmentation fault

Maybe I should mention that it's really in fact a huge module, over 20,000 lines. But we don't have the same problem with that and similar modules on our Texis 5.x installations on Linux.

Here is a few more information about the setup...


Texis Web Script (Vortex) Copyright (c) 1996-2015 Thunderstone - EPI, Inc.
Commercial Version 7.03.1434477553 20150616 (x86_64-unknown-linux2.6.9-64-64)

Linux version 2.6.32-573.7.1.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Tue Sep 22 22:00:00 UTC 2015

CentOS release 6.7 (Final)
-------


please let me know where to look further in resolving this issue.

Thanks,
Nenad
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Segmentation fault error when compile

Post by Kai »

Does it generate a core file if run with -x? Open a tech support ticket; we may need a copy of the module and other files in your environment to reproduce the issue here.
nduvnjak
Posts: 40
Joined: Wed Feb 06, 2008 3:45 pm

Segmentation fault error when compile

Post by nduvnjak »

Thank you...
we may have isolated the problem, at least one possible cause for this. It's directly related to HUGE if-elseif segments. Namely, there are couple of ELSEIF blocks that containt up to 280+ conditions in them, divided by OR. For example:
<elseif $SITEDOMAIN eq 'www.citroen-club.it' or $SITEDOMAIN eq 'www.hwupgrade.org' ... or ....
etc, with a lot of these ORs. By elimination system we discovered that anything over 123 ORs (i.e. 124 or more conditions in a single IF or ELSEIF), the module refuses to compile and fires that segmentation fault.

Please comment and provide an advice regarding this.

Surely, we can design our code to avoid this and break our "huge IFs" into multiple smaller ones, but I would like to point out that identical module works just fine on our Texis 5.x setup.
So is there a setting that we are missing in our Texis 7.x installation, or this is a known limitation you are aware of?


thanks,
Nenad
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Segmentation fault error when compile

Post by Kai »

It could be the size of the entire statement as well; but that's just speculation until we can reproduce it here. Can you open a tech support ticket and send a ZIPped copy of the code that segfaults, as well as any module(s) it uses? Then we can try to run it here and find a fix.

In the meantime, you could rewrite a series of clauses of the form '$SITEDOMAIN eq 'www.example.com' or ...' to this:

<$list = "www.example.com" "www.otherexample.com" ...>
<if $SITEDOMAIN in ($list)>
true
</if>

That will at least make the statement more compact.
nduvnjak
Posts: 40
Joined: Wed Feb 06, 2008 3:45 pm

Segmentation fault error when compile

Post by nduvnjak »

how do I upload a file (module) when I open the ticket?
I created the ticket and about to hit "Submit" but there is nowhere an option to include a file
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Segmentation fault error when compile

Post by Kai »

Just send the text of the message for now. You'll get an email reply that you can reply to with a ZIP attachment with the module(s).
Post Reply