Bug#959501: luabind: std::terminate called on luabind:error

2020-05-24 Thread Andreas Grob
Dear Maintainer,

this is now fixed in upstream https://github.com/ValyriaTear/luabind at commit 
a9287d342c70a37b68beca694ee75f2d5c747db4.
I have also included a regression test there.
Link to commit in upstream: 
https://github.com/ValyriaTear/luabind/commit/7555d9c7f20d7cb37628870e9b7e3eb9c0bb32fb

The mentioned snapshot (a9287d34) also includes a patch I provided previously, 
as well as a regression test for that patch.
Link to patch: 
https://sources.debian.org/patches/luabind/0.9.1+git20150823+dfsg-3/02_fix_potential_null_ptr_dereference_in_adopt_policy.patch/
Link to commit in upstream: 
https://github.com/ValyriaTear/luabind/commit/2fb1f5e35b3aec06539fe4df7e357d3010ddf3f2

Kind regards,
Andreas Grob



Bug#959501: luabind: std::terminate called on luabind:error

2020-05-02 Thread Andreas Grob
Source: luabind
Version: 0.9.1+git20150823+dfsg-3
Severity: important
Tags: patch upstream

Dear Maintainer,

the upstream snapshot (76d4061) fixes some instances of std::terminate being 
called when luabind::error is thrown
in a destructor by utilizing a macro that evaluates to noexcept(false). 
Unfortunately, it seems one of those
instances has not been fixed.

In luabind/detail/call_member.hpp:233 LUABIND_MAY_THROW needs to be
attached to ~proxy_member_void_caller() to fix this bug.

I have also reported this issue to the upstream source:
https://github.com/ValyriaTear/luabind/pull/2

For your convenience I will attach a patch.


Kind regards,
Andreas Grob


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.5.0-2-amd64 (SMP w/6 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Author: Andreas Grob 
Description: Prevent std::terminate in ~proxy_member_void_caller()

If luabind::error is thrown in ~proxy_member_void_caller() std::terminate will 
be called, unless we set noexcept(false).

This should complement the fix made in upstream commit 94fedc6.

I have also suggested this fix in upstream at 
https://github.com/ValyriaTear/luabind/pull/2

Index: luabind-0.9.1+git20150823+dfsg/luabind/detail/call_member.hpp
===
--- luabind-0.9.1+git20150823+dfsg.orig/luabind/detail/call_member.hpp
+++ luabind-0.9.1+git20150823+dfsg/luabind/detail/call_member.hpp
@@ -230,7 +230,7 @@ namespace luabind
 rhs.m_called = true;
 }

-~proxy_member_void_caller()
+~proxy_member_void_caller() LUABIND_MAY_THROW
 {
 if (m_called) return;