pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid memcpy() with same source and destination address.
14+ messages / 2 participants
[nested] [flat]

* pgsql: Avoid memcpy() with same source and destination address.
@ 2014-03-07 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 14+ messages in thread

From: Heikki Linnakangas @ 2014-03-07 11:50 UTC (permalink / raw)
  To: pgsql-committers

Avoid memcpy() with same source and destination address.

The behavior of that is undefined, although unlikely to lead to problems in
practice.

Found by running regression tests with Valgrind.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ad7b48ea08d6c33bae0a33c5f2a06272293c0f2f

Modified Files
--------------
src/backend/tsearch/dict_ispell.c |    9 ++++-----
src/backend/utils/adt/tsvector.c  |    3 ++-
2 files changed, 6 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination address.
@ 2014-03-07 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 14+ messages in thread

From: Heikki Linnakangas @ 2014-03-07 11:50 UTC (permalink / raw)
  To: pgsql-committers

Avoid memcpy() with same source and destination address.

The behavior of that is undefined, although unlikely to lead to problems in
practice.

Found by running regression tests with Valgrind.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8332fe76b559dd7d0a689ec66e96c359e67e1f3b

Modified Files
--------------
src/backend/tsearch/dict_ispell.c |    9 ++++-----
src/backend/utils/adt/tsvector.c  |    3 ++-
2 files changed, 6 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination address.
@ 2014-03-07 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 14+ messages in thread

From: Heikki Linnakangas @ 2014-03-07 11:50 UTC (permalink / raw)
  To: pgsql-committers

Avoid memcpy() with same source and destination address.

The behavior of that is undefined, although unlikely to lead to problems in
practice.

Found by running regression tests with Valgrind.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/4afc3f0faa3b1f86c23dabe716c3324962543fa6

Modified Files
--------------
src/backend/tsearch/dict_ispell.c |    9 ++++-----
src/backend/utils/adt/tsvector.c  |    3 ++-
2 files changed, 6 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination address.
@ 2014-03-07 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 14+ messages in thread

From: Heikki Linnakangas @ 2014-03-07 11:50 UTC (permalink / raw)
  To: pgsql-committers

Avoid memcpy() with same source and destination address.

The behavior of that is undefined, although unlikely to lead to problems in
practice.

Found by running regression tests with Valgrind.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/c7a186e392d4654148a45eaf8ffbf026553ecbdb

Modified Files
--------------
src/backend/tsearch/dict_ispell.c |    9 ++++-----
src/backend/utils/adt/tsvector.c  |    3 ++-
2 files changed, 6 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination address.
@ 2014-03-07 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 14+ messages in thread

From: Heikki Linnakangas @ 2014-03-07 11:50 UTC (permalink / raw)
  To: pgsql-committers

Avoid memcpy() with same source and destination address.

The behavior of that is undefined, although unlikely to lead to problems in
practice.

Found by running regression tests with Valgrind.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/d8f2858b884c4b9c77a14a9e9e6ea5f16a48faf3

Modified Files
--------------
src/backend/tsearch/dict_ispell.c |    9 ++++-----
src/backend/utils/adt/tsvector.c  |    3 ++-
2 files changed, 6 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination address.
@ 2014-03-07 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 14+ messages in thread

From: Heikki Linnakangas @ 2014-03-07 11:50 UTC (permalink / raw)
  To: pgsql-committers

Avoid memcpy() with same source and destination address.

The behavior of that is undefined, although unlikely to lead to problems in
practice.

Found by running regression tests with Valgrind.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ff9d757c67786b389f19abc3187d158adda500d8

Modified Files
--------------
src/backend/tsearch/dict_ispell.c |    9 ++++-----
src/backend/utils/adt/tsvector.c  |    3 ++-
2 files changed, 6 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination during relmapper
@ 2020-12-18 20:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-18 20:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination during relmapper init.

A narrow reading of the C standard says that memcpy(x,x,n) is undefined,
although it's hard to envision an implementation that would really
misbehave.  However, analysis tools such as valgrind might whine about
this; accordingly, let's band-aid relmapper.c to not do it.

See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes.
Apparently, none of those folk tried valgrinding initdb?  This has been
like this for long enough that I'm surprised it hasn't been reported
before.

Back-patch, just in case anybody wants to use a back branch on a platform
that complains about this; we back-patched those earlier fixes too.

Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/53d4f5fef04653fc495ae385a9c2f78c77e5c7d9

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination during relmapper
@ 2020-12-18 20:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-18 20:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination during relmapper init.

A narrow reading of the C standard says that memcpy(x,x,n) is undefined,
although it's hard to envision an implementation that would really
misbehave.  However, analysis tools such as valgrind might whine about
this; accordingly, let's band-aid relmapper.c to not do it.

See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes.
Apparently, none of those folk tried valgrinding initdb?  This has been
like this for long enough that I'm surprised it hasn't been reported
before.

Back-patch, just in case anybody wants to use a back branch on a platform
that complains about this; we back-patched those earlier fixes too.

Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/722eb325b9511e9d0a8669112c636edebe2cb01b

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination during relmapper
@ 2020-12-18 20:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-18 20:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination during relmapper init.

A narrow reading of the C standard says that memcpy(x,x,n) is undefined,
although it's hard to envision an implementation that would really
misbehave.  However, analysis tools such as valgrind might whine about
this; accordingly, let's band-aid relmapper.c to not do it.

See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes.
Apparently, none of those folk tried valgrinding initdb?  This has been
like this for long enough that I'm surprised it hasn't been reported
before.

Back-patch, just in case anybody wants to use a back branch on a platform
that complains about this; we back-patched those earlier fixes too.

Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ba04cedf1d262f3d7dfe6950b13a7ed1d80a9502

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination during relmapper
@ 2020-12-18 20:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-18 20:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination during relmapper init.

A narrow reading of the C standard says that memcpy(x,x,n) is undefined,
although it's hard to envision an implementation that would really
misbehave.  However, analysis tools such as valgrind might whine about
this; accordingly, let's band-aid relmapper.c to not do it.

See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes.
Apparently, none of those folk tried valgrinding initdb?  This has been
like this for long enough that I'm surprised it hasn't been reported
before.

Back-patch, just in case anybody wants to use a back branch on a platform
that complains about this; we back-patched those earlier fixes too.

Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/21b2ee6ee376c0c9d05dd1edfa8d68c87ffcbd0a

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination during relmapper
@ 2020-12-18 20:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-18 20:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination during relmapper init.

A narrow reading of the C standard says that memcpy(x,x,n) is undefined,
although it's hard to envision an implementation that would really
misbehave.  However, analysis tools such as valgrind might whine about
this; accordingly, let's band-aid relmapper.c to not do it.

See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes.
Apparently, none of those folk tried valgrinding initdb?  This has been
like this for long enough that I'm surprised it hasn't been reported
before.

Back-patch, just in case anybody wants to use a back branch on a platform
that complains about this; we back-patched those earlier fixes too.

Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b70cab8a2c835f37cabcbe85ad480b7ce3889ee1

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination during relmapper
@ 2020-12-18 20:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-18 20:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination during relmapper init.

A narrow reading of the C standard says that memcpy(x,x,n) is undefined,
although it's hard to envision an implementation that would really
misbehave.  However, analysis tools such as valgrind might whine about
this; accordingly, let's band-aid relmapper.c to not do it.

See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes.
Apparently, none of those folk tried valgrinding initdb?  This has been
like this for long enough that I'm surprised it hasn't been reported
before.

Back-patch, just in case anybody wants to use a back branch on a platform
that complains about this; we back-patched those earlier fixes too.

Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/48786740094ca527d381587ab909c23ca6d5a855

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination during relmapper
@ 2020-12-18 20:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-18 20:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination during relmapper init.

A narrow reading of the C standard says that memcpy(x,x,n) is undefined,
although it's hard to envision an implementation that would really
misbehave.  However, analysis tools such as valgrind might whine about
this; accordingly, let's band-aid relmapper.c to not do it.

See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes.
Apparently, none of those folk tried valgrinding initdb?  This has been
like this for long enough that I'm surprised it hasn't been reported
before.

Back-patch, just in case anybody wants to use a back branch on a platform
that complains about this; we back-patched those earlier fixes too.

Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/94aaa79afe656e6845d3c8af0befa8922edae0e8

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* pgsql: Avoid memcpy() with same source and destination in pgstat_recv_r
@ 2020-12-20 17:38 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2020-12-20 17:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid memcpy() with same source and destination in pgstat_recv_replslot.

Same type of issue as in commit 53d4f5fef and earlier fixes; also
found by apparently-more-picky-than-the-buildfarm valgrind testing.
This one is an oversight in commit 986816750.  Since that's new in
HEAD, no need for a back-patch.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ed6329cfa975a13c58c44676464585cda5d317b3

Modified Files
--------------
src/backend/postmaster/pgstat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 14+ messages in thread


end of thread, other threads:[~2020-12-20 17:38 UTC | newest]

Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-03-07 11:50 pgsql: Avoid memcpy() with same source and destination address. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2014-03-07 11:50 pgsql: Avoid memcpy() with same source and destination address. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2014-03-07 11:50 pgsql: Avoid memcpy() with same source and destination address. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2014-03-07 11:50 pgsql: Avoid memcpy() with same source and destination address. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2014-03-07 11:50 pgsql: Avoid memcpy() with same source and destination address. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2014-03-07 11:50 pgsql: Avoid memcpy() with same source and destination address. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2020-12-18 20:47 pgsql: Avoid memcpy() with same source and destination during relmapper Tom Lane <tgl@sss.pgh.pa.us>
2020-12-18 20:47 pgsql: Avoid memcpy() with same source and destination during relmapper Tom Lane <tgl@sss.pgh.pa.us>
2020-12-18 20:47 pgsql: Avoid memcpy() with same source and destination during relmapper Tom Lane <tgl@sss.pgh.pa.us>
2020-12-18 20:47 pgsql: Avoid memcpy() with same source and destination during relmapper Tom Lane <tgl@sss.pgh.pa.us>
2020-12-18 20:47 pgsql: Avoid memcpy() with same source and destination during relmapper Tom Lane <tgl@sss.pgh.pa.us>
2020-12-18 20:47 pgsql: Avoid memcpy() with same source and destination during relmapper Tom Lane <tgl@sss.pgh.pa.us>
2020-12-18 20:47 pgsql: Avoid memcpy() with same source and destination during relmapper Tom Lane <tgl@sss.pgh.pa.us>
2020-12-20 17:38 pgsql: Avoid memcpy() with same source and destination in pgstat_recv_r Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox