[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#561500: Metapost: segmentation fault while text is included with btex etex




Hi,

Norbert Preining wrote:
- mpost should not segfault on a missing etex

I cannot reproduce the segfault. The output below is from /bin/bash,
but I also tried with zsh, same results. Does debian have a private
executable, or is it reusing the texlive one?

logistic.mp is attached.

Best wishes,
Taco

My machine is:

[taco@ntg tmp]$ cat /etc/issue
Mandriva Linux release 2009.0 (Official) for x86_64
Kernel 2.6.27.21-desktop-1mnb on a Dual-processor x86_64 / \l
[taco@ntg tmp]$ grep ^TEX\\b `kpsewhich texmf.cnf`
TEX = etex
[taco@ntg tmp]$ export LANG=fr_FR.UTF-8
[taco@ntg tmp]$ export LC_CTYPE=fr_FR.UTF-8
[taco@ntg tmp]$ /opt/tex/texlive/Master/bin/x86_64-linux/mpost logistic.mp
This is MetaPost, version 1.208 (kpathsea version 5.0.0)
(./logistic.mpfatal: exec failed: No such file or directoryfatal: Command failed: etex --parse-first-line --interaction=nonstopmode mp303041.tex; see mpxerr.log
>> logistic.mp
>> logistic.mpx
! Unable to make mpx file.
l.33   label.bot(btex
                      $r$ etex, ((rmax-0.2)*ux,0));
Transcript written on logistic.log.
[taco@ntg tmp]$ valgrind /opt/tex/texlive/Master/bin/x86_64-linux/mpost logistic.mp ==31629== Memcheck, a memory error detector. ==31629== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==31629== Using LibVEX rev 1854, a library for dynamic binary translation. ==31629== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==31629== Using valgrind-3.3.1, a dynamic binary instrumentation framework. ==31629== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==31629== For more details, rerun with: -v ==31629== This is MetaPost, version 1.208 (kpathsea version 5.0.0) (./logistic.mpfatal: exec failed: No such file or directory==31630== ==31630== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1) ==31630== malloc/free: in use at exit: 3,603,612 bytes in 166,876 blocks. ==31630== malloc/free: 262,049 allocs, 95,173 frees, 74,446,521 bytes allocated.
==31630== For counts of detected errors, rerun with: -v
==31630== searching for pointers to 166,876 not-freed blocks.
==31630== checked 3,401,368 bytes.
==31630==
==31630== LEAK SUMMARY:
==31630==    definitely lost: 6,778 bytes in 283 blocks.
==31630==      possibly lost: 0 bytes in 0 blocks.
==31630==    still reachable: 3,596,834 bytes in 166,593 blocks.
==31630==         suppressed: 0 bytes in 0 blocks.
==31630== Rerun with --leak-check=full to see details of leaked memory.
fatal: Command failed: etex --parse-first-line --interaction=nonstopmode mp303082.tex; see mpxerr.log
>> logistic.mp
>> logistic.mpx
! Unable to make mpx file.
l.33   label.bot(btex
                      $r$ etex, ((rmax-0.2)*ux,0));
Transcript written on logistic.log.
==31629==
==31629== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1)
==31629== malloc/free: in use at exit: 3,601,967 bytes in 166,872 blocks.
==31629== malloc/free: 262,050 allocs, 95,178 frees, 74,446,584 bytes allocated.
==31629== For counts of detected errors, rerun with: -v
==31629== searching for pointers to 166,872 not-freed blocks.
==31629== checked 3,400,824 bytes.
==31629==
==31629== LEAK SUMMARY:
==31629==    definitely lost: 6,269 bytes in 281 blocks.
==31629==      possibly lost: 0 bytes in 0 blocks.
==31629==    still reachable: 3,595,698 bytes in 166,591 blocks.
==31629==         suppressed: 0 bytes in 0 blocks.
==31629== Rerun with --leak-check=full to see details of leaked memory.

verbatimtex
%&latex
  \documentclass{article}
  \begin{document}
  etex
  
beginfig(1)
  numeric rmin, rmax, r, dr, n, ux, uy;
  rmin := 2.9; rmax := 3.9;
  r := rmin; n := 175;
  dr := (rmax - rmin)/n;
  ux := 8cm; uy := 8cm;
  for i = 1 upto n:
    x := 0.5; % our starting point
    for j=1 upto 75: % initial iterations
      x := r*x*(1-x);
    endfor
    for j=1 upto 150: % the next 100 iterations
      x := r*x*(1-x);
      draw (r*ux,x*uy) withpen pencircle scaled .5pt;
    endfor
    r := r+dr;
  endfor;
  draw (rmin*ux,0) -- (rmax*ux,0);
  draw (rmin*ux,0) -- (rmin*ux,uy);
  labeloffset := 0.25cm;
  label.bot(decimal(rmin), (rmin*ux,0));
  label.bot(decimal((rmin+rmax)/2), ((rmin+rmax)/2*ux,0));
  label.bot(decimal(rmax), (rmax*ux,0));
  label.lft(decimal(0), (rmin*ux,0));
  label.lft(decimal(0.5), (rmin*ux,0.5*uy));
  label.lft(decimal(1), (rmin*ux,uy));
  label.bot(btex $r$ etex, ((rmax-0.2)*ux,0));
  label.lft(btex orbit etex rotated 90, (rmin*ux,0.75*uy));
endfig;
end;

Reply to: