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


Quelle  memory-maximum-clamping.js   Sprache: JAVA

 
const MemoryMaxValid = 65536;

// Linking should fail if the imported memory has a higher maximum than required,
// however if we internally clamp maximum values to an implementation limit
// and use that for linking we may erroneously accept some modules.

function testLinkFail(importMax, importedMax) {
  assertErrorMessage(() => {
    let importedMemory = new WebAssembly.Memory({
      initial: 0,
      maximum: importedMax,
    });
    wasmEvalText(`(module
      (memory (import "" "") 0 ${importMax})
    )`, {"": {"": importedMemory}});
  }, WebAssembly.LinkError, /incompatible maximum/);
}

testLinkFail(0, 1);
testLinkFail(MemoryMaxValid - 1, MemoryMaxValid);

// The type reflection interface for WebAssembly.Memory should not report
// an internally clamped maximum.

if ('type' in WebAssembly.Memory.prototype) {
  let memory = new WebAssembly.Memory({
    initial: 0,
    maximum: MemoryMaxValid,
  });
  let type = memory.type();
  assertEq(type.maximum, MemoryMaxValid, 'reported memory maximum is not clamped');
}

Messung V0.5
C=85 H=100 G=92

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge