Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #85696

Re: undexpected modification of string array

From Paavo Helde <eesnimi@osa.pri.ee>
Newsgroups comp.lang.c++
Subject Re: undexpected modification of string array
Date 2022-07-27 20:29 +0300
Organization A noiseless patient Spider
Message-ID <tbrsmf$2itfp$1@dont-email.me> (permalink)
References <tbrpb2$2pdoq$1@portraits.wsisiz.edu.pl>

Show all headers | View raw


27.07.2022 19:32 Jivanmukta kirjutas:
> 
> I have object of my class source_file:
[...]
> The problem is that in some moment of time source_lines[318] is 
> unexpectedly modified, I don't know why and when, although the file is 
> correctly loaded to source_lines[], I mean open() works fine and some 
> time later get_next_line() returns spoilt string. Conditional 
> breakpoints don't work (I use VSCodium).
> How to find the moment of modification of source_line[318]?

If it is well reproducible, then a data breakpoint should work fine. 
Note that hardware data breakpoints are max 4 or 8 bytes, so you will 
need to figure out the exact address in the memory which will be 
illegally modified, and put a data breakpoint on it.

 > bool inside_php,

Last time I used PHP as an in-process library, it wrote over some random 
foreign memory when initializing itself. It was a bit tricky to cope 
with as I was not able to compile its sources any more :-S





Back to comp.lang.c++ | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

undexpected modification of string array Jivanmukta <jivanmukta@poczta.onet.pl> - 2022-07-27 18:32 +0200
  Re: undexpected modification of string array Ralf Fassel <ralfixx@gmx.de> - 2022-07-27 19:20 +0200
  Re: undexpected modification of string array Paavo Helde <eesnimi@osa.pri.ee> - 2022-07-27 20:29 +0300

csiph-web