mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-06 09:51:41 +08:00
ed33bc01d5f4e9a736830d706371163ab2db8e5a
When scanning an iterator object, the iterated object was marked unconditionally. Now it's marked only if it's not already marked - like all other object markings. This code was incorrect for some years, but wasn't really an issue before commit331c5ecbecause marking an object twice simply used some more CPU cycles but otherwise without issues - unless there were cycles, and apparently typically/always there never were cycles with iterators, so it was hard/impossible to behave badly. However, since331c5ec, marking an object means inserting it into a linked list where the list nodes are part of the object, therefore marking the same object twice now creates a broken linked list. A broken list means that some objects are skipped while scanned, which means they don't get marked even when they should, and as a result freed incorrectly while still referenced by other objects, resulting in random errors related to use-after-free.
…
…
…
…
MuJS: an embeddable Javascript interpreter in C. ABOUT MuJS is a lightweight Javascript interpreter designed for embedding in other software to extend them with scripting capabilities. LICENSE MuJS is Copyright 2013-2017 Artifex Software, Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. The software is provided "as is" and the author disclaims all warranties with regard to this software including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, direct, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. COMPILING If you are building from source you can either use the provided Unix Makefile: make release Or compile the source with your preferred compiler: cc -O2 -c one.c -o libmujs.o INSTALLING To install the MuJS command line interpreter, static library and header file: make prefix=/usr/local install DOWNLOAD The latest development source is available directly from the git repository: git clone http://git.ghostscript.com/mujs.git REPORTING BUGS AND PROBLEMS Report bugs on the ghostscript bugzilla, with MuJS as the selected component. http://bugs.ghostscript.com/ The MuJS developers hang out on IRC in the #mupdf channel on irc.freenode.net.
Description