[SERVER-6232] seg fault when providing an empty object as an expression argument Created: 28/Jun/12  Updated: 11/Jul/16  Resolved: 10/Jul/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 2.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Matt Dannenberg
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

It looks like parsing an empty object in Expression::parseObject() produces a null pointer. And ExpressionNary::optimize() does not expect null pointers in vpOperand.

Test:

c = db.c;
c.drop();
c.save( {} );
c.aggregate( { $project:{ a:{ $and:[ {} ] } } } );



 Comments   
Comment by auto [ 10/Jul/12 ]

Author:

{u'date': u'2012-07-06T13:42:37-07:00', u'name': u'Matt Dannenberg', u'email': u'dannenberg.matt@gmail.com'}

Message: SERVER-6232 support empty objects in aggro
Branch: master
https://github.com/mongodb/mongo/commit/75e0b75d84513c1c9e1408dc3d55466f1aa1cfd4

Comment by Mathias Stearn [ 03/Jul/12 ]

this can probably be squashed at the same time as your $literal fixes

Generated at Thu Feb 08 03:11:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.