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

Running gs causes segfault on Linux/ppc #1079

Closed
michaelrsweet opened this issue Feb 11, 2005 · 2 comments
Closed

Running gs causes segfault on Linux/ppc #1079

michaelrsweet opened this issue Feb 11, 2005 · 2 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 8.15rc1
CUPS.org User: arekm.pld-linux

(gdb) r
Starting program: /usr/bin/gs
ESP Ghostscript 815.00 (2005-02-08)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.

Program received signal SIGSEGV, Segmentation fault.
0x100f9c60 in gc_objects_clear_marks (cp=0x1063b9f0) at src/igc.c:582
582 struct_proc_clear_marks((*proc)) =
(gdb) bt
#0 0x100f9c60 in gc_objects_clear_marks (cp=0x1063b9f0) at src/igc.c:582
#1 0x100f8d78 in gs_gc_reclaim (pspaces=0x10655400, global=1) at src/igc.c:263
#2 0x10170040 in context_reclaim (pspaces=0x10655400, global=1) at src/zcontext.c:286
#3 0x100bdcd0 in gs_vmreclaim (dmem=0x106553fc, global=1) at src/ireclaim.c:156
#4 0x100bd960 in ireclaim (dmem=0x106553fc, space=8) at src/ireclaim.c:78
#5 0x100b6c70 in interp_reclaim (pi_ctx_p=0x104dc0f0, space=8) at src/interp.c:418
#6 0x100b709c in gs_call_interp (pi_ctx_p=0x104dc0f0, pref=0x7fffe740, user_errors=1, pexit_code=0x7fffe978,

perror_object=0x7fffe980) at src/interp.c:516

#7 0x100b6d40 in gs_interpret (pi_ctx_p=0x104dc0f0, pref=0x7fffe740, user_errors=1, pexit_code=0x7fffe978,

perror_object=0x7fffe980) at src/interp.c:445

#8 0x100a9944 in gs_main_interpret (minst=0x104dbeec, pref=0x7fffe798, user_errors=1, pexit_code=0x7fffe978,

perror_object=0x7fffe980) at src/imain.c:297

#9 0x100aa430 in gs_run_init_file (minst=0x104dbeec, pexit_code=0x7fffe978, perror_object=0x7fffe980) at src/imain.c:531
#10 0x100a9ad0 in gs_main_init2 (minst=0x104dbeec) at src/imain.c:346
#11 0x100ac06c in gs_main_init_with_args (minst=0x104dbeec, argc=1, argv=0x7ffff374) at src/imainarg.c:258
#12 0x10004db8 in main (argc=1, argv=0x7ffff374) at src/gs.c:45

(gdb) l
45 int code = gs_main_init_with_args(minst, argc, argv);
46
47 #ifdef RUN_STRINGS
48 { /* Run a list of strings (for testing). _/
49 const char *_pstr = run_strings;
50
51 for (; *pstr; ++pstr) {
52 int exit_code;
53 ref error_object;
54 int code;
gdb) frame 0
#0 0x100f9c60 in gc_objects_clear_marks (cp=0x1063b9f0) at src/igc.c:582

582 struct_proc_clear_marks((_proc)) =
(gdb) l
577 gc_objects_clear_marks(chunk_t * cp)
578 {
579 if_debug_chunk('6', "[6]unmarking chunk", cp);
580 SCAN_CHUNK_OBJECTS(cp)
581 DO_ALL
582 struct_proc_clear_marks((_proc)) =
583 pre->o_type->clear_marks;
584 #ifdef DEBUG
585 if (pre->o_type != &st_free)
586 debug_check_object(pre, cp, NULL);
(gdb) print proc
$3 = (void (*)(void *, uint, const gs_memory_struct_type_t *)) 0x100fbab0 <refs_clear_marks>
(gdb) print *proc
$4 = {void (void *, uint, const gs_memory_struct_type_t *)} 0x100fbab0 <refs_clear_marks>

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: arekm.pld-linux

Working and tested fix is:
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/ghostscript-esp-align.patch?rev=1.1
With it gs no longer segfaults on my linux/ppc.

Issue is described here (see bugs marked as duplicate of this one)
http://bugs.ghostscript.com/show_bug.cgi?id=687643

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

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

1 participant