Skip to content

valgrind: WString: strings overlap #5949

Closed
@d-a-v

Description

@d-a-v

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: any
  • Core Version: git
  • Development Env: other: host emulation
  • Operating System: linux

Settings in IDE

  • Module: any
  • Flash Mode: any
  • Flash Size: any
  • lwip Variant: any
  • Reset Method: any
  • Flash Frequency: any
  • CPU Frequency: any
  • Upload Using: any
  • Upload Speed: any

Problem Description

valgrind complains with core/esp8266/WString.cpp:

Source and destination overlap in strcpy(0x1fff0000e0, 0x1fff0000e0)

MCVE Sketch

void setup ()
{
        String blah = "blah";
        blah.replace("xx","y");
}

void loop ()
{
}

How to reproduce:

cd tests/host
mkdir -p ino/WString
# put MCVE in ino/WString/WString.ino
make -j FORCE32=0 ino/WString/WString
# ...
valgrind bin/WString/WString

line 747:

strcpy(writeTo, readFrom);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions