External engine trigger crashing server if table have computed field
--------------------------------------------------------------------

                 Key: CORE-5972
                 URL: http://tracker.firebirdsql.org/browse/CORE-5972
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 4.0 Beta 1, 3.0.5
            Reporter: Artyom Smirnov


Reproduction steps (on master):

1. Create simple UDR trigger in examples/udr/Triggers.cpp and build it.

FB_UDR_BEGIN_TRIGGER(dummy)
        FB_UDR_EXECUTE_TRIGGER
        {
                printf("test! \n");
        }
FB_UDR_END_TRIGGER

2. Execute it on table with computed field:

create database 'localhost:/tmp/test_trig.fdb';
create table test(id int, comp int computed by (1));
create trigger dummy after insert on test external name 'udrcpp_example!dummy' 
engine udr;
insert into test values(1);

3. Server will crash.

Stacktrace:

Thread 5 "firebird" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff0c04700 (LWP 15380)]
__memmove_sse2_unaligned_erms () at 
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:311
311     ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file 
or directory.
(gdb) bt 6
#0  __memmove_sse2_unaligned_erms () at 
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:311
#1  0x00007ffff4e62d82 in CVT_move_common (from=0x7ffff0c02440, 
to=0x7ffff0c02450, decSt=..., cb=0x7ffff47cc700) at 
/workspace/rdb/firebird_master/src/common/cvt.cpp:1508
#2  0x00007ffff4a85e45 in CVT_move (from=0x7ffff0c02440, to=0x7ffff0c02450, 
decSt=...) at /workspace/rdb/firebird_master/src/jrd/../jrd/cvt_proto.h:74
#3  0x00007ffff4b4d66f in MOV_move (tdbb=0x7ffff0c03580, from=0x7ffff0c02440, 
to=0x7ffff0c02450) at /workspace/rdb/firebird_master/src/jrd/mov.cpp:449
#4  0x00007ffff4977d9f in Jrd::ExtEngineManager::Trigger::setValues 
(this=0x7ffff4378c80, tdbb=0x7ffff0c03580, msgBuffer=..., rpb=0x7fffe8fe55f0)
    at /workspace/rdb/firebird_master/src/jrd/ExtEngineManager.cpp:983
#5  0x00007ffff49777e8 in Jrd::ExtEngineManager::Trigger::execute 
(this=0x7ffff4378c80, tdbb=0x7ffff0c03580, action=1, oldRpb=0x0, 
newRpb=0x7fffe8fe55f0)
    at /workspace/rdb/firebird_master/src/jrd/ExtEngineManager.cpp:914
(More stack frames follow...)
(gdb) f 1
#1  0x00007ffff4e62d82 in CVT_move_common (from=0x7ffff0c02440, 
to=0x7ffff0c02450, decSt=..., cb=0x7ffff47cc700) at 
/workspace/rdb/firebird_master/src/common/cvt.cpp:1508
1508                            memcpy(p, q, length);
(gdb) p q
$1 = (const UCHAR *) 0x0


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to