[pcre-dev] [Bug 2532] New: Throwing C++ exceptions out of p…

Top Page
Delete this message
Author: admin
Date:  
To: pcre-dev
New-Topics: [pcre-dev] [Bug 2532] Throwing C++ exceptions out of pcre2_callout in jit mode
Subject: [pcre-dev] [Bug 2532] New: Throwing C++ exceptions out of pcre2_callout in jit mode
https://bugs.exim.org/show_bug.cgi?id=2532

            Bug ID: 2532
           Summary: Throwing C++ exceptions out of pcre2_callout in jit
                    mode
           Product: PCRE
           Version: 10.34 (PCRE2)
          Hardware: All
                OS: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: kkilger@???
                CC: pcre-dev@???


Dear Zoltán,

We have a complicated server application running its own proprietary
programming language inside an interpreter loop. I tried to make pcre2_callout
feature available for users of my programming language. So the stack would be:

User program => Running pcre_match => Running jit code => Running pcre2_callout
             => Running new interpreter loop of proprietary language


The nested interpreter loops communicate via C++ exceptions with each other.
If, for example, there is not enough memory in the inner loop, the outer loop
must be cancelled as well. In this case it makes not much sense to proceed with
the REGEX matching.

I recognized however, that throwing C++ exception through pcre2_callout when
called from jit compiler is not possible.

Do you know the reason? Is there an easy way to fix it?

In any case the workaround would be to disable jit. It then works perfectly.

Thanks
Kilian.

--
You are receiving this mail because:
You are on the CC list for the bug.