Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  nuke-error-wrapper.js

  Sprache: JAVA
 

// |jit-test| error:finished
var g = newGlobal({newCompartment: true});
g.evaluate(`
  // Override Error.prototype.name with a getter that nukes CCWs
  Object.defineProperty(Error.prototype, 'name', {
    get: function() {
      // Nuke all cross-compartment wrappers pointing into this realm.
      // This makes the CCW in the main compartment (that roots our ErrorObject)
      // become a dead proxy, removing the only reference to our ErrorObject.
      nukeAllCCWs();

      // Force a full GC to tenure the ErrorObject and compact heap.
      // ErrorObject survives this GC because it's 'this' (on the C++ stack).
      gc();
      
      // Set maxBytes to current gcBytes so the NEXT allocation triggers GC.
      // The next GC will collect the ErrorObject, freeing its JSErrorReport.
      gcparam('maxBytes', gcparam('gcBytes'));

      // Return undefined (not a string) to force fallback to reportp->exnType
      // and then reportp->newMessageString (both UAF after GC collects ErrorObject)
      return undefined;
    }
  });

  // Create the Error object in this compartment
  this.err = new Error("finished");
`);

// Get a CCW (cross-compartment wrapper) to the ErrorObject.
// Then clear the reference in compartment A so the only reference is through our CCW.
// Then throw the foreign error at top level.
var foreignError = g.err;
g.err = null;
throw foreignError;

Messung V0.5 in Prozent
C=58 H=100 G=81

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002