Subject: | segfault on empty queries |
When the code is executed with an empty query it causes a segfault.
Sample dump (cleaned up some personal parts)
Subject: | report.txt |
Use of uninitialized value in subroutine entry at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 574, <DATA> line 1.
Segmentation fault
$ perl -w -dE 'use ORM::XML::FeatureChangelog; use Promises qw(await); my $foo = await { ORM::XML::FeatureChangelog->selectall_arrayref_promise; };'
Loading DB routines from perl5db.pl version 1.49_05
Editor support available.
Enter h or 'h h' for help, or 'man perldebug' for more help.
main::(-e:1): use ORM::XML::FeatureChangelog; use Promises qw(await); my $foo = await { ORM::XML::FeatureChangelog->selectall_arrayref_promise; };
DB<1> c
Use of uninitialized value in subroutine entry at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 574, <DATA> line 1.
at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 574, <DATA> line 1.
MariaDB::NonBlocking::Event::__ANON__[$lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm:577](MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 324
eval {...} called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 326
MariaDB::NonBlocking::Event::__ANON__[$lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm:347](MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 349
MariaDB::NonBlocking::Event::____run(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), "run_multiple_queries", CODE(0x7f4195216870), CODE(0x7f4195228420), CODE(0x7f41952288e8), HASH(0x7f419875bd20)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 580
MariaDB::NonBlocking::Event::run_multiple_queries(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), ARRAY(0x7f41952166f0), HASH(0x7f419875bd20)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Promises.pm line 24
MariaDB::NonBlocking::Promises::run_multiple_queries(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), ARRAY(0x7f41952166f0), HASH(0x7f419875bd20)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 537
MariaDB::NonBlocking::Event::run_query(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), undef, ARRAY(0x7f41a54a3048), HASH(0x7f419875bd20)) called at ORM/Promises/Pool.pm line 1232
ORM::Promises::Pool::_run_query(ORM::Promises::Pool=HASH(0x7f41951c48e8), MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), undef, HASH(0x7f419875bd20), ARRAY(0x7f41a54a3048), Promises::Deferred=HASH(0x7f41951c4348), ARRAY(0x7f4195205720)) called at ORM/Promises/Pool.pm line 1360
eval {...} called at ORM/Promises/Pool.pm line 1369
ORM::Promises::Pool::run_query_from_pending(ORM::Promises::Pool=HASH(0x7f41951c48e8)) called at ORM/Promises/Pool.pm line 587
ORM::Promises::Pool::__ANON__[ORM/Promises/Pool.pm:589](300) called at Promises/Deferred.pm line 105
eval {...} called at Promises/Deferred.pm line 127
Promises::Deferred::_invoke_cb(ARRAY(0x7f4195218060)) called at Promises/Deferred.pm line 50
Promises::Deferred::_invoke_cbs_callback() called at Promises/Deferred/AE.pm line 13
Promises::Deferred::AE::notify_callback(EV::IO=SCALAR(0x7f41986e8cd8), 1) called at $lib/lib/perl5/x86_64-linux/AnyEvent/Impl/EV.pm line 88
eval {...} called at $lib/lib/perl5/x86_64-linux/AnyEvent/Impl/EV.pm line 88
AnyEvent::CondVar::Base::_wait(AnyEvent::CondVar=HASH(0x7f41951c4690)) called at $lib/lib/perl5/x86_64-linux/AnyEvent.pm line 2023
AnyEvent::CondVar::Base::recv(AnyEvent::CondVar=HASH(0x7f41951c4690)) called at /Promises.pm line 170
_cv_wait(AnyEvent::CondVar=HASH(0x7f41951c4690)) called at /Promises.pm line 276
Promises::await(CODE(0x7f41ac04c960)) called at -e line 1
Signal SEGV at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 324, <DATA> line 1.
eval {...} called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 326
MariaDB::NonBlocking::Event::__ANON__[$lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm:347](MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 349
MariaDB::NonBlocking::Event::____run(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), "run_multiple_queries", CODE(0x7f4195216870), CODE(0x7f4195228420), CODE(0x7f41952288e8), HASH(0x7f419875bd20)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 580
MariaDB::NonBlocking::Event::run_multiple_queries(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), ARRAY(0x7f41952166f0), HASH(0x7f419875bd20)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Promises.pm line 24
MariaDB::NonBlocking::Promises::run_multiple_queries(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), ARRAY(0x7f41952166f0), HASH(0x7f419875bd20)) called at $lib/lib/perl5/x86_64-linux/MariaDB/NonBlocking/Event.pm line 537
MariaDB::NonBlocking::Event::run_query(MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), undef, ARRAY(0x7f41a54a3048), HASH(0x7f419875bd20)) called at ORM/Promises/Pool.pm line 1232
ORM::Promises::Pool::_run_query(ORM::Promises::Pool=HASH(0x7f41951c48e8), MariaDB::NonBlocking::Promises=HASH(0x7f41951c4ea0), undef, HASH(0x7f419875bd20), ARRAY(0x7f41a54a3048), Promises::Deferred=HASH(0x7f41951c4348), ARRAY(0x7f4195205720)) called at ORM/Promises/Pool.pm line 1360
eval {...} called at ORM/Promises/Pool.pm line 1369
ORM::Promises::Pool::run_query_from_pending(ORM::Promises::Pool=HASH(0x7f41951c48e8)) called at ORM/Promises/Pool.pm line 587
ORM::Promises::Pool::__ANON__[ORM/Promises/Pool.pm:589](300) called at Promises/Deferred.pm line 105
eval {...} called at Promises/Deferred.pm line 127
Promises::Deferred::_invoke_cb(ARRAY(0x7f4195218060)) called at Promises/Deferred.pm line 50
Promises::Deferred::_invoke_cbs_callback() called at Promises/Deferred/AE.pm line 13
Promises::Deferred::AE::notify_callback(EV::IO=SCALAR(0x7f41986e8cd8), 1) called at $lib/lib/perl5/x86_64-linux/AnyEvent/Impl/EV.pm line 88
eval {...} called at $lib/lib/perl5/x86_64-linux/AnyEvent/Impl/EV.pm line 88
AnyEvent::CondVar::Base::_wait(AnyEvent::CondVar=HASH(0x7f41951c4690)) called at $lib/lib/perl5/x86_64-linux/AnyEvent.pm line 2023
AnyEvent::CondVar::Base::recv(AnyEvent::CondVar=HASH(0x7f41951c4690)) called at /Promises.pm line 170
_cv_wait(AnyEvent::CondVar=HASH(0x7f41951c4690)) called at /Promises.pm line 276
Promises::await(CODE(0x7f41ac04c960)) called at -e line 1
Aborted