[Ovmsdev] std::string data corruption (issue #189)
Michael Balzer
dexter at expeedo.de
Tue Jan 29 03:46:58 HKT 2019
To clarify: the bug is most likely not restricted to the case of building a message in a buffer. It can possibly cause corruptions in any RAM section, so can
well be responsible for many/most of the unidentified crashes and stack/heap corruptions we're experiencing.
Regards,
Michael
Am 28.01.19 um 20:43 schrieb Michael Balzer:
> For those not following the github discussion: I'm pretty sure I've nailed the bug down.
>
> I have reproduced the bug in a simple test project and intend to raise an issue with Espressif on this.
>
> https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/189#issuecomment-457965435
>
> If you'd like to test this on your module, configure the project to your wifi credentials, then use "make flash". As the test project is small, this normally
> will not erase your OVMS config partition, but a backup is always recommended.
>
> Regards,
> Michael
>
>
> Am 24.01.19 um 21:19 schrieb Michael Balzer:
>> Everyone please have a look at…
>>
>> https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/189#issuecomment-457334248
>>
>> Please try to reproduce the bug on your modules.
>>
>> I'm open for explanations.
>>
>> I thought this might be some copy-on-write bug with std::string, but the gcc 5.x libstdc++ does no longer use that implementation (wouldn't be C++11
>> compliant as well). I also tried moving all strings to temporary buffers, but modes 5 & 6 eliminated this explanation as well.
>>
>> My remaining theories:
>>
>> * A task writing out of bounds (but only 0-bytes?)
>> * A hardware issue only affecting some modules
>>
>> A hardware issue only affecting some percentage of ESP32 could explain this as well as the strange heap corruptions that seem to affect some modules
>> especially often.
>>
>> Regards,
>> Michael
>>
>> --
>> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
> --
> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20190128/5613e3b6/attachment.htm>
More information about the OvmsDev
mailing list