Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package mujs for openSUSE:Factory checked in 
at 2026-02-16 13:23:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mujs (Old)
 and      /work/SRC/openSUSE:Factory/.mujs.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mujs"

Mon Feb 16 13:23:03 2026 rev:15 rq:1332991 version:1.3.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/mujs/mujs.changes        2025-07-30 
11:45:43.427584250 +0200
+++ /work/SRC/openSUSE:Factory/.mujs.new.1977/mujs.changes      2026-02-16 
13:23:07.336554192 +0100
@@ -1,0 +2,10 @@
+Fri Feb 13 21:55:15 UTC 2026 - Avindra Goolcharan <[email protected]>
+
+- Update to 1.3.8
+  * Improve Error.stack and restore Error.stackTrace
+  * Add rudimentary runtime limit checks: Set a hard limit on
+    number of instructions executed and/or number of of bytes
+    allocated.
+- update urls to codeberg and new website
+
+-------------------------------------------------------------------

Old:
----
  mujs-1.3.7.tar.gz

New:
----
  mujs-1.3.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mujs.spec ++++++
--- /var/tmp/diff_new_pack.qhkE4r/_old  2026-02-16 13:23:08.332595626 +0100
+++ /var/tmp/diff_new_pack.qhkE4r/_new  2026-02-16 13:23:08.336595792 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package mujs
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,13 @@
 
 %define ucd_ver 16.0.0
 Name:           mujs
-Version:        1.3.7
+Version:        1.3.8
 Release:        0
 Summary:        An embeddable Javascript interpreter
 License:        ISC
 Group:          Development/Languages/C and C++
-URL:            https://github.com/ccxvii/%{name}
-Source0:        
https://github.com/ccxvii/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+URL:            https://mujs.com/
+Source0:        
https://codeberg.org/ccxvii/mujs/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 # v=16.0.0 && u=https://www.unicode.org/Public/$v/ucd && f1=SpecialCasing.txt 
&& f2=UnicodeData.txt && f=ucd-$v.tar.xz && cd /tmp && curl -O $u/$f1 -O $u/$f2 
&& tar c --remove-files "$f1" "$f2" | xz -9e > "$f"
 Source1:        ucd-%{ucd_ver}.tar.xz
 BuildRequires:  pkgconfig
@@ -43,7 +43,7 @@
 This package provides the MuJS static library.
 
 %prep
-%autosetup -p1 -a1
+%autosetup -p1 -a1 -n %{name}
 
 %build
 %global _lto_cflags %{_lto_cflags} -ffat-lto-objects

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.qhkE4r/_old  2026-02-16 13:23:08.384597789 +0100
+++ /var/tmp/diff_new_pack.qhkE4r/_new  2026-02-16 13:23:08.392598122 +0100
@@ -1,6 +1,6 @@
-mtime: 1753709343
-commit: 453a098b8ffeb7a955cfcea9ccb012b78a561462a4257d0857748d59f0ea16fb
+mtime: 1771019980
+commit: 456d3604b9494238d363adb1cbd3d5f62ad8656f5c267cddbf17fc5753774c9a
 url: https://src.opensuse.org/javascript/mujs.git
-revision: 453a098b8ffeb7a955cfcea9ccb012b78a561462a4257d0857748d59f0ea16fb
+revision: 456d3604b9494238d363adb1cbd3d5f62ad8656f5c267cddbf17fc5753774c9a
 projectscmsync: https://src.opensuse.org/javascript/_ObsPrj.git
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-02-13 23:00:07.000000000 +0100
@@ -0,0 +1 @@
+.osc

++++++ mujs-1.3.7.tar.gz -> mujs-1.3.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mujs-1.3.7/jserror.c new/mujs/jserror.c
--- old/mujs-1.3.7/jserror.c    2025-06-23 14:15:36.000000000 +0200
+++ new/mujs/jserror.c  2025-11-07 22:14:55.000000000 +0100
@@ -53,6 +53,13 @@
        }
 }
 
+static void Ep_get_stack(js_State *J)
+{
+       Ep_toString(J);
+       js_getproperty(J, 0, "stackTrace");
+       js_concat(J);
+}
+
 static int jsB_ErrorX(js_State *J, js_Object *prototype)
 {
        js_pushobject(J, jsV_newobject(J, JS_CERROR, prototype));
@@ -61,7 +68,7 @@
                js_defproperty(J, -2, "message", JS_DONTENUM);
        }
        if (jsB_stacktrace(J, 1))
-               js_defproperty(J, -2, "stack", JS_DONTENUM);
+               js_defproperty(J, -2, "stackTrace", JS_DONTENUM);
        return 1;
 }
 
@@ -71,7 +78,7 @@
        js_pushstring(J, message);
        js_setproperty(J, -2, "message");
        if (jsB_stacktrace(J, 0))
-               js_setproperty(J, -2, "stack");
+               js_setproperty(J, -2, "stackTrace");
 }
 
 #define DERROR(name, Name) \
@@ -105,8 +112,12 @@
 {
        js_pushobject(J, J->Error_prototype);
        {
-                       jsB_props(J, "name", "Error");
-                       jsB_propf(J, "Error.prototype.toString", Ep_toString, 
0);
+               jsB_props(J, "name", "Error");
+               jsB_propf(J, "Error.prototype.toString", Ep_toString, 0);
+
+               js_newcfunction(J, Ep_get_stack, "stack", 0);
+               js_pushnull(J);
+               js_defaccessor(J, -3, "stack", JS_READONLY | JS_DONTENUM | 
JS_DONTCONF);
        }
        js_newcconstructor(J, jsB_Error, jsB_Error, "Error", 1);
        js_defglobal(J, "Error", JS_DONTENUM);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mujs-1.3.7/jsi.h new/mujs/jsi.h
--- old/mujs-1.3.7/jsi.h        2025-06-23 14:15:36.000000000 +0200
+++ new/mujs/jsi.h      2025-11-07 22:14:55.000000000 +0100
@@ -270,6 +270,9 @@
 
        js_Object *gcroot; /* gc scan list */
 
+       int runlimit;
+       int memlimit;
+
        /* environments on the call stack but currently not in scope */
        int envtop;
        js_Environment *envstack[JS_ENVLIMIT];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mujs-1.3.7/jsrun.c new/mujs/jsrun.c
--- old/mujs-1.3.7/jsrun.c      2025-06-23 14:15:36.000000000 +0200
+++ new/mujs/jsrun.c    2025-11-07 22:14:55.000000000 +0100
@@ -35,9 +35,29 @@
        js_throw(J);
 }
 
+static void js_runlimit(js_State *J)
+{
+       STACK[TOP].t.type = JS_TLITSTR;
+       STACK[TOP].u.litstr = "script ran too long";
+       ++TOP;
+       js_throw(J);
+}
+
+void js_setlimit(js_State *J, int runlimit, int memlimit)
+{
+       J->runlimit = runlimit;
+       J->memlimit = memlimit;
+}
+
 void *js_malloc(js_State *J, int size)
 {
-       void *ptr = J->alloc(J->actx, NULL, size);
+       void *ptr;
+       if (J->memlimit > 0) {
+               if (size >= J->memlimit)
+                       js_outofmemory(J);
+               J->memlimit -= size;
+       }
+       ptr = J->alloc(J->actx, NULL, size);
        if (!ptr)
                js_outofmemory(J);
        return ptr;
@@ -45,6 +65,12 @@
 
 void *js_realloc(js_State *J, void *ptr, int size)
 {
+       if (J->memlimit > 0) {
+               // TODO: track released memory
+               if (size >= J->memlimit)
+                       js_outofmemory(J);
+               J->memlimit -= size;
+       }
        ptr = J->alloc(J->actx, ptr, size);
        if (!ptr)
                js_outofmemory(J);
@@ -61,6 +87,7 @@
 
 void js_free(js_State *J, void *ptr)
 {
+       // TODO: track released memory (J->memlimit)
        J->alloc(J->actx, ptr, 0);
 }
 
@@ -1571,6 +1598,12 @@
        pc += sizeof(str) / sizeof(*pc)
 
        while (1) {
+               if (J->runlimit > 0) {
+                       if (J->runlimit == 1)
+                               js_runlimit(J);
+                       --J->runlimit;
+               }
+
                if (J->gccounter > J->gcthresh)
                        js_gc(J, 0);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mujs-1.3.7/main.c new/mujs/main.c
--- old/mujs-1.3.7/main.c       2025-06-23 14:15:36.000000000 +0200
+++ new/mujs/main.c     2025-11-07 22:14:55.000000000 +0100
@@ -222,12 +222,7 @@
 
 
 static const char *stacktrace_js =
-       "Error.prototype.toString = function() {\n"
-       "var s = this.name;\n"
-       "if ('message' in this) s += ': ' + this.message;\n"
-       "if ('stack' in this) s += this.stack;\n"
-       "return s;\n"
-       "};\n"
+       "Error.prototype.toString = function() { return this.stack }\n"
 ;
 
 static const char *console_js =
@@ -300,13 +295,17 @@
        int status = 0;
        int strict = 0;
        int interactive = 0;
+       int runlimit = 0;
+       int memlimit = 0;
        int i, c;
 
-       while ((c = xgetopt(argc, argv, "is")) != -1) {
+       while ((c = xgetopt(argc, argv, "isR:M:")) != -1) {
                switch (c) {
                default: usage(); break;
                case 'i': interactive = 1; break;
                case 's': strict = 1; break;
+               case 'R': runlimit = atoi(xoptarg); break;
+               case 'M': memlimit = atoi(xoptarg); break;
                }
        }
 
@@ -360,6 +359,7 @@
                }
                js_setglobal(J, "scriptArgs");
 
+               js_setlimit(J, runlimit, memlimit);
                if (js_dofile(J, argv[c]))
                        status = 1;
        }
@@ -372,6 +372,7 @@
                        rl_bind_key('\t', rl_insert);
                        input = readline(PS1);
                        while (input) {
+                               js_setlimit(J, runlimit, memlimit);
                                eval_print(J, input);
                                if (*input)
                                        add_history(input);
@@ -381,6 +382,7 @@
                        putchar('\n');
                } else {
                        input = read_stdin();
+                       js_setlimit(J, runlimit, memlimit);
                        if (!input || !js_dostring(J, input))
                                status = 1;
                        free(input);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mujs-1.3.7/mujs.h new/mujs/mujs.h
--- old/mujs-1.3.7/mujs.h       2025-06-23 14:15:36.000000000 +0200
+++ new/mujs/mujs.h     2025-11-07 22:14:55.000000000 +0100
@@ -9,7 +9,7 @@
 
 #define JS_VERSION_MAJOR 1
 #define JS_VERSION_MINOR 3
-#define JS_VERSION_PATCH 5
+#define JS_VERSION_PATCH 8
 
 #define JS_VERSION (JS_VERSION_MAJOR * 10000 + JS_VERSION_MINOR * 100 + 
JS_VERSION_PATCH)
 #define JS_CHECKVERSION(x,y,z) (JS_VERSION >= ((x) * 10000 + (y) * 100 + (z)))
@@ -56,6 +56,7 @@
 js_Panic js_atpanic(js_State *J, js_Panic panic);
 void js_freestate(js_State *J);
 void js_gc(js_State *J, int report);
+void js_setlimit(js_State *J, int runlimit, int memlimit);
 
 int js_dostring(js_State *J, const char *source);
 int js_dofile(js_State *J, const char *filename);

Reply via email to