-
Type: Bug
-
Resolution: Done
-
Priority: Blocker - P1
-
Affects Version/s: 1.0.0-beta1
-
Component/s: None
-
None
$filter = []; $options = ['sort' => array()]; $query = new MongoDB\Driver\Query($filter, $options); var_dump($options);
The sort option is changed to a stdClass instance.
$options = ['sort' => array()]; $filter = []; $options2 = $options; $options2["cursorFlags"] = 0; $query = new MongoDB\Driver\Query($filter, $options2); $options["cursorFlags"] = 0; var_dump($options);
The above results in:
[Mon Sep 21 16:51:11 2015] Script: '/home/jmikola/workspace/mongodb/phpc/segfault/exception1.php' /home/jmikola/workspace/mongodb/phpc/php_phongo.c(382) : Freeing 0x7F97DBBEFD68 (32 bytes), script=/home/jmikola/workspace/mongodb/phpc/segfault/exception1.php === Total 1 memory leaks detected ===
Dumping the sort option from exception1.php after a second Query construction results in its value being displayed as "&UNKNOWN:0", which indicates some corruption.
Lastly, it's possible to invoke a segfault by executing one of these queries (see segfault.php).
- is depended on by
-
PHPLIB-117 Segfault during FindOne test
- Closed
- related to
-
PHPC-403 Query discards or munges numeric _id value
- Closed
- links to