Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration option '-DPERL_POISON' not documented #16789

Open
p5pRT opened this issue Dec 15, 2018 · 3 comments
Open

Configuration option '-DPERL_POISON' not documented #16789

p5pRT opened this issue Dec 15, 2018 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 15, 2018

Migrated from rt.perl.org#133727 (status was 'new')

Searchable as RT133727$

@p5pRT
Copy link
Author

p5pRT commented Dec 15, 2018

From @jkeenan

'-DPERL_POISON' is not currently documented in the core distribution.
Inquiring about this on #p5p, stsc pointed me to
http​://news.perlfoundation.org/2012/10/, wherein Nicholas discussed it
in the course of one of his monthly TPF grant reports​:

#####
The intent of -DPERL_POISON is to try scribble all over freed memory, to
spot use-after free errors (by promptly SEGVing).
#####

Can someone who is familiar with this option prepare some documentation
in, say, pod/perlhacktips.pod?

(My attention was drawn to this from this smoke-test report​:
http​://perl5.test-smoke.org/report/76043. Welcome back George Greer!)

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Dec 15, 2018

From @jkeenan

Summary of my perl5 (revision 5 version 29 subversion 6) configuration​:
  Derived from​: c4df8c7
  Platform​:
  osname=linux
  osvers=4.15.0-42-generic
  archname=x86_64-linux
  uname='linux zareason 4.15.0-42-generic #45-ubuntu smp thu nov 15 19​:32​:57 utc 2018 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='cc'
  ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  optimize='-O2'
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='7.3.0'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='cc'
  ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
  libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.27.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.27'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  HAS_TIMES
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_USE_DEVEL
  USE_64_BIT_ALL
  USE_64_BIT_INT
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  Locally applied patches​:
  uncommitted-changes
  Built under linux
  Compiled at Dec 15 2018 10​:22​:19
  %ENV​:
  PERL2DIR="/home/jkeenan/gitwork/perl2"
  PERLBREW_HOME="/home/jkeenan/.perlbrew"
  PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/man"
  PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin​:/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/bin"
  PERLBREW_PERL="perl-5.28.0"
  PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
  PERLBREW_SHELLRC_VERSION="0.84"
  PERLBREW_VERSION="0.84"
  PERL_WORKDIR="/home/jkeenan/gitwork/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.29.6/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.29.6
  /usr/local/lib/perl5/5.29.6/x86_64-linux
  /usr/local/lib/perl5/5.29.6

@jkeenan
Copy link
Contributor

jkeenan commented Jul 10, 2022

From @jkeenan

'-DPERL_POISON' is not currently documented in the core distribution. Inquiring about this on #p5p, stsc pointed me to http​://news.perlfoundation.org/2012/10/, wherein Nicholas discussed it in the course of one of his monthly TPF grant reports​:

The intent of -DPERL_POISON is to try scribble all over freed memory, to spot use-after free errors (by promptly SEGVing).

Can someone who is familiar with this option prepare some documentation in, say, pod/perlhacktips.pod?

(My attention was drawn to this from this smoke-test report​: http​://perl5.test-smoke.org/report/76043. Welcome back George Greer!)

Thank you very much. Jim Keenan

@nwc10, could you take a look at this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants