vapor-community / mongo-driver

MongoDB driver for Fluent
28 stars 26 forks source link

Fixed a segmentation fault crash on Linux #23

Closed miroslavkovac closed 7 years ago

miroslavkovac commented 7 years ago

This PR fixes a segmentation fault that is crushing the app when calling a description function on Foundation.Date object for the second time (https://bugs.swift.org/browse/SR-2485).

Since BSON.Value.dateTime is still unsupported, we will try to print error message about unsupported enum case, which prints associated date, which causes a segmentation fault.

The "actual" bug is in deed not in the MongoDriver, but before Apple fixes SR-2485, we cannot print descriptions of Date on Linux more then once ;)

tanner0101 commented 7 years ago

Thanks!