►
Description
Speaker: Pawel Bylica, Ethereum
Topic: Weird quirks while testing WebAssembly
Fizzy https://github.com/wasmx/fizzy
Ethereum https://ethereum.org/en/
Wasm in Web3 workshop https://avive.github.io/wasm_on_the_blockchain_2021/#/
A
Okay,
hello,
everyone
out
there
watching
and
listening
to
to
today's
talks.
This
talk
is
about
testing
web
assembly
in
relation
to
the
project.
Alex
was
mentioning
before
the
original
title
was
weird
quirks
about
that,
but
I
think
in
the
end
I
ended
up
or
more
positive
side
of
the
things
and
and
yeah
try
a
little
quick
journey
about
what
you
have
learned
about
that.
A
I
was
also
working
for
e-wasm
project,
which
the
main
goal
was
to
introduce
web
assembly
to
ethereum
blockchain
previously
as
a
replacement
for
evm,
and
then
we
thought
about
running
them
side
by
side
and
currently
I'm
I'm.
We.
We
did
change
her
name
to
the
team
that
was
working
on
execution
engines
and
the
current
name
is
epsilon,
which
alex
mentioned
before,
and
you
can
find
some
of
some
of
our
notes
on
the
site
linked
there.
A
A
And
and
one
of
the
goals
we
had
with
the
with
the
project
was
to
evaluate
and
and
improve
web
assembly
1.0
specification
that
wasn't
the
only
goal.
But
I
think
this
talk
is
is
most
related
to
this
one,
and
I
will
try
to
explain
that
in
in
three
different
parts.
A
But,
first
of
all,
we
need
to
answer
the
question.
What
actually
we
mean
by
the
web
assembly
1.0?
So
I
think
that
the
most
correct
answer
to
that
what
it
is
is
that
is
the
document
that
is
published
under
name
web
assembly,
core
specification
done
in
december
2019-
and
this
is
this-
is
official
w3c
recommendation
and
you
can
find
it
on
on
this
link.
A
A
And
there's
also
second
source
you
can
look
into
this
is
a
github
github
organizat,
the
github
organization
web
assembly,
that
has
a
repository,
called
spec
and
and
this
one
this
source
is,
is,
I
think,
much
more
useful
because
addition
to
the
text,
which
is
regularly
published
in
automatic
way
of
the
specification
you
can
also
have
on
it-
contains
also
specification
test,
so-called
last
files
and
and
and
web
assembly
interpreter
implementation
in
or
common,
which
is
exchanged
aligned
to
the
specification
changes.
A
So
this
is
this,
is
these
are
two
important
parts
of
that,
but
the
problem
we
had
with
with
with
this
repository
it
doesn't
really
mark
the
the
1.0
version,
so
there
are
different
git
tags
and
different
git
branches.
That
kind
of
suggest
this
is
work
related
to
to
1.0,
but
we
weren't
100
sure
that
we
actually
have
the
correct
one.
A
So
we
believe
the
the
branch
mentioned
the
last
one
is
is
the
correct,
although
we
also
had
issues
with
with
building
the
the
the
final
document
that
is
published
on
w3c
web
page,
but
nevertheless
we
continued
our
work
from
this
w3c
1.0
branch,
which
is
still
still
there.
A
And
why
I'm
mentioning
continuing
working,
because
so
what
we
wanted
to
do
is
to
improve
web
assembly
by
contributing
to
the
specification
and
first
of
all,
we
we
identified
missing
test
cases
and
wanted
to
to
to
submit
new
new
ones,
and
but
we
we
by
by
the
by
the
design
we
are,
we
want
to
our
product
to
be
restricted
to
web
assembly
1.0.
A
So
we
don't
really
want
to
use
spec
tests
from,
let's
say
master
branch
where
there
are
some
extensions
added
and
it
tracks
what
is
called
web
assembly
1.1,
although
that
never
this
version
never
has
been
finalized.
Yet
so
that's
that's
not
really
option
for
us,
and,
and
additionally,
there
are
some
some
issues
to
the
spec.
That's
my
would
welcome
some
corrections.
They
are
not
like
substantial
problems,
but
we
we've
seen
some
small
corrections
happening
on
the
way
and
they
are
not
included
in
the
the
1.0
document.
A
So
one
of
example
of
such,
like
small
bug,
fixes
I
just
found
it
mine-
searched
that
recently
it's
done
by
some
other
contributor
and
it
mostly
fixes
a
typo
but
just
like
it
makes
it
makes
the
specification
more
correct
and
less
confusing
this
way.
So
there's
in
this
case,
and
it
affects
the
the
load
instruction,
which
is
definitely
part
of
1.0
specification,
so
I
double
check
that
and
in
the
in
the
master
or
like
the
the
recent,
the
recent
specification
published
regularly.
A
So
because,
like
of
these
two
problems,
mostly
because
not
not
having
any
maintained
1.0
branch
for
for
web
assembly
specification,
we
decided
to
do
it
ourselves.
So
we
have
the
fork
of
the
spec
repo,
and
then
we
created
the
the
branch
which
is
w3c
1.0,
test
pack
ported.
A
Originally,
we
we
mostly
considered
test
pack
porting
to
that,
but
they
also
like
small
fix,
also
included,
and
we
also
had
some
discussion
with
the
maintenance
of
the
spec
repo,
but
I
think
that
hasn't
been
resolved
fully
and
the
the
interest
in
that
I'm
not
sure
like
to
mine
to
my
impression
was-
was
like
limited
so
yeah.
I
think
that
was
needed
for
our
job
and
we
we
started
to
to
do
that.
However,
there's
this
one
issue
of
the
with
the
the
process:
how
how
does
work?
Does
it
work?
A
So
we
prefer
to
do
at
least
the
the
new
test
auditions
to
be
first
included
in
the
the
upstream
spec
repository,
but
the
only
option
to
include
them
is
to
to
to
to
target
and
the
master
branch
of
that,
so
that's
sometimes
challenging
because
of
the
additional
extension
that
already
exists
there,
and
only
after
this
change
is
acts
I
mean
the
test
set
is
accepted
and
upstream
we
can
backboard
that
to
to
our
branch.
So
it
also
kind
of
prolongs
the
the
process
where
we
fall.
A
So
about
the
new
test
additions,
so
besides,
like
manual
discovered
like
cases
we
would
like
to
add,
which
is
very
rarely-
we
had
two
big
sources
of
of
the
possible
test
cases.
One
is
fuzzing
and
second
is
code
coverage,
and
I
will
try
to
quickly
go
through
both
of
these
sources.
A
So
so
for
fuzzing,
I
I
actually
mean
web
assembly
validation,
fuzzing,
so
quickly
introducing
fast
testing,
it's
a
semi-automated
process
that
generates
pseudorandom
inputs
for
your
code
and
then
it
expects
some
feedback
loop
to.
A
If
this
I
mean,
if
this,
the
the
generated
input
are
interesting
or
not,
the
most
famous
feedbacks
is
is
if
you're,
if
your
program
crashes,
that's
like
great,
because
the
the
father
is
super
happy
about
that,
but
there's
other
options
to
to
provide
some
feedback
information
to
this,
to
this
testing
and
in
case
of
web
assembly
validation.
That's
that's
that's
ideal
and
also
simple
case.
It's
because
of
the
of
the
like
structure
of
of
validation.
A
So
as
an
input,
you
get
some
binary
data,
so
it's
mostly
the
array
of
bytes
and
that's
exactly
what
what
the
the
fuzzing
tools
are
generally
are,
generating
and
and
as
the
output
we
actually
have
like
only
one
bit
which
very
much
limits
the
well
the
size
of
that,
because
we
only
got
information
if
the
the
provided
bytes
are
a
valid
web
assembly
module
or
not.
A
So,
in
particular
this
in
in
our
case,
we
we
used
because
most
of
the
code
we
did
test
is
c
or
c
plus,
plus
we
used
leap
fuzzer,
which
is
part
of
another
vm
tool
chain,
along
with
the
llvm
sanitizers
and
and
there
we
there.
We
used
less
known
at
least
additional
instrumentation
options
and
runtime
options
to
to
extend
number
of
checks.
The
the
sanitizers
are
performing,
especially
for
our
code.
A
I
didn't
I
didn't
list
all
of
these,
but
if
you
may
be
interested
in
this,
there's
a
way
to
find
that
in
our
repository
in
the
configuration
files-
or
I
can
also
some
other
time
about
that-
and
the
main
targets
were
fizzy.
Our
project
and
wabit
mentioned
before
wabit
is
a
hobbit
is,
is
a
web
assembly
binary
toolkit
which
can
serialize
deserialize,
validate
and
also
interpret
webassembly
code
and
and
also
resides
on
in
the
webassembly
github
organization?.
A
And
how
exactly
that
was
when
the
the
testing
loop,
how
it
looked
like
so
as
you
can
imagine,
the
first
step
is
to
actually
feed
the
divides
to
to
fizzy
or
or
end
to
a
bit
and
compare
the
any
answer.
If
they
agree
about
that
about
the
validity
of
some
some
bytes.
A
That's
that's
great
and
we
can
like
check
on
our
test
case
and
in
case
it
happens
that
one
of
them
may,
if
in
case
of
mismatch,
but
in
their
answer,
that's
that's.
That's
a
hit
for
us
that
something
is
wrong
in
some
of
them.
A
So
what
we
can
do
with
that
with
this,
this
dump
of
of
the
test
case.
We
can
convert
that
to
more
representative
way,
a
form
which
is
last
test.
It's
not
super
complicated,
but
it
needs
some
additional
annotations.
A
What
you
expect
from
it
to
be,
but
mostly
it's
done
to
actually
feed
it
to
existing
other
tools,
and
then
we
we
confront
that
test
case
with
the
the
dimension
before
spec
interpreter,
which
is
this
a
common
implementation
of
of
web
assembly
and
and
then
we
can,
we
can
know
which
one
is,
which
one
was
what's
right
about
that
and
finally,
we
can
debug
the
the
one
which
is
for
was
fault,
and
that
was
mostly
wobbled
and
it's
not
because
it
was
badly
implemented.
A
But
there
are
some
reasons
for
it,
and
I
will
explain
that
later.
So
then,
what
we
can
do
is
to
debug
and
fix
the
code
or
at
least
report
the
issue
in
in
the
in
the
pro
in
the
upstream
project.
A
A
And
finally,
we
can
backboard
that
to
our
weapons,
md
1.0
branch.
A
That's
mostly
how
it
look,
and
we
can
repeat
that
over
and
over
again
yeah
and
side
note
for
that,
we
did
publish
the
the
exact
so-called
fuzzy
corpus,
which
is
the
collection
all
of
the
test
cases
that
the
fuzzing
tool
finds
interesting
in
both
of
implementations.
A
For
reason
that
this
process
hasn't
been
finished
yet,
and
so
we
we
mostly
limited
the
number
of
of
the
size
of
the
input
to
to
make
the
testing
faster,
and
you
can
find
additional
information
in
the
in
the
link
about
about
that.
A
To
do
yeah
so
those
sum
summary
to
summarize
the
this,
this
fuzzing
effort,
it's
not
completed
because
after
extending
the
the
the
fuzzing,
mostly
the
the
input
size,
we
discover
new
issues
and
it's
like
it's
quite
time
consuming
to
to
fix
this
all
the
problems
at
in
this
single
point
in
time.
So
this
is
ongoing
process.
A
Taken
and
con
continued
by
someone
else
and
and
and
and
most
of
the
the
issues
we
found
are
are
related
to
first
of
all,
custom
sections
that
can
happen
in
web
assembly.
So
in
our
implementation
we
ignore
them,
because
we
don't,
we
don't
have
any
interest
in
them
in
them,
but
it
it
happens
to
that.
Some
of
the
custom
sections
are
actually
specified
in
some
other
places
and
they
also
have
some
validity
rules,
so
I
would
understand
some
of
them.
A
That
means
it
will
also
validate
custom
sections
if
they
happen
to
found,
find
them,
and
this
is
the
one
of
the
reasons
physient
and
wabbit
are
in
disagreement
about
some
of
the
modules
most
meaning
like
fizzy,
will
consider
them
valid,
and
why
would
not?
Because
some
of
the
custom
sections
are
actually
not
valid
so
for
us
there's
not
really
other
way
to
to
kind
of
add
some
ignorance
to
the
to
the
tool
to
ignore
such
errors.
It's
a
bit
of
annoying
part
but
can
be,
can
be
solved.
A
A
second
and
like
the
biggest
source
of
of
issues
in
in
wabit
was
was
actually
other
extensions,
so
wabi
doesn't
enable
these
extensions
by
default.
At
least
that
was
the
case
some
time
ago,
but
these
all
the
tools
they
provide
have
have
an
option
to
disable
or
enable
an
extension.
A
So
most
of
the
cases,
the
the
the
binary,
loader
or
parser
called
differently
actually
was
too
permissive
about
some
of
the
things
coming
from
extensions
and
allowed
that
to
to
go
further,
and
that
was
to
my
to
my,
if
I
recall
correctly,
the
the
main
source
of
the
of
the
issues
and
yeah
and
we
we
were
able
to
correct
these
one
by
one.
A
And
something
we
haven't
done,
but
I
think
it
was,
would
be
even
more
exciting
than
than
the
the
validity
fuzzing
was
to
actually
execute
some
code
and
uncheck
if
both
produce
the
same
results.
A
So
we
planned
to
do
this
as
always,
there's
little
time
to
do
stuff
and
but
yeah.
If
someone
is
interested,
that
would
be
interesting
project.
I
think,
and
one
one
thing
we
find
would
be
mostly
required,
for
it
is
some
kind
of
metering
to
at
least
cop
how
long
the
the
the
wasm
code
executes.
A
Otherwise,
you
can
quickly
find
infinite
loops
in
the
code
which
is
valid
and
but
yeah,
I
will
halt
your
fuzzing
efforts.
A
Okay,
so
that
was
that
was
more
or
less
about
how
we
did
fuzzing
and
this
this
another
source
we
used
for
feeding
new
test
cases
to
the
to
the
official
spec,
which
is
called
coverage,
even
if,
in
this
example,
which
is
just
by
my
wife,
one
thing
is
kind
of
just
catchy
image.
A
A
If
the
positive
aspect
of
something
happened,
I
mean
mostly
if
the
execution
or
anything
else
happened,
the
way
it
was
designed
for,
but
they
don't
really
check
all
the
all
the
cases
when,
when
web
assembly
should
fail
in
specific
way-
and
so
that's
actually
easy
to
find
in
the
code
coverage
traces
because
error
cases
are
usually
I
mean
some
other
cases
are
not
covered
by
that.
A
So
so
we
put
a
bit
of
attention
to
this
and-
and
we
separate
test
coverage
reports
by
the
the
tests
that
we
are
running
so
for
internal
unit
tests.
We
we
do
have
separate
report
and
for
official
spec
test.
We
have
additional
report
and
then
we
can
see
in
this
additional
report
that
which
lines
in
the
code
of
our
implementation
are
not
covered
by
that.
A
Yeah-
and
that
was
like
pretty
straightforward
way
to
to
extend
number
of
spec
tests
upstream,
I
think
we
didn't
cover
all
of
the
cases
yet.
The
example
from
the
previous
site
was
actually
taken
from
from
the
most
recent
test
coverage
report,
but
this
is
this
is
a
relatively
straightforward
process
and
you
can
repeat
that
over
and
over
again
until
you
have
until
you
reach
a
100
coverage,.
A
Yeah
and
now
I'm
coming
to
the
kind
of
the
last
subject
of
this
talk,
which
is
floating
point
instructions
in
webassembly.
A
So
if
you
recall,
I
mean
this
one
bit
of
information,
I
will
need
later
so
well,
there's
this
a
lot
of
say
about
flaunting
points.
But
one
thing
I
will
need
later
is
that
it's
you
can
decompose
such
representation
floating
point
representation
as
a
as
a
sign
bit
exponent,
part
and
and
monty
support
and
yeah.
Let's
move
on
so
so
we
did
consider
starting
fizzy
product
and
also
web
assembly
product,
as
as
a
whole,
I
mean
he
was
in
project
as
a
whole
to
skip
floating
point
instructions
altogether.
A
So,
first
of
all,
we
don't
believe
they
are
super
critical
to
implement
blockchain
programs
or
smart
contracts
so
that
that
zone
can
save
us
over
60,
less
instructions
to
implement
and
to
test
and
to
maintain
and
to
do
all
the
stuff.
That
is
related.
I
mean
it's
also
like
limits
the
id,
the
attack
attack,
surface
and
all
other
properties
of
the
system,
but
most
most
importantly,
the
the
floating
point.
Specification
for
web
assembly
allows
the
operation
to
be
non-deterministic
and
that's
that's
like
critical
part.
A
A
First
of
all,
the
official
spec
test
are
not
really
designed
the
way
you
can
skip
floating
point
distractions.
I
think
nobody
thought
about
that's
useful
thing.
A
So
floating
point
distractions
are
mixed
in
for
testing
of
different
aspects
of
web
assembly,
for
example,
you
can
find
big
test
suits
for
memory
in
web
assembly
that
just
use
floating
points
because
they
need
to
pick
any
type
for
for
some
tests
and
and
it's
not
that
there
doesn't
exist
easy
way
to
to
avoid
floating
point
instructions
unless
you
want
to
skip
a
lot
of
inspectors
from
running
in
your
program.
A
And
lastly,
there's
there's
also
like
a
lot
of
to
explain
to
other
people
and
other
projects
that
you
don't
support.
This
part
of
web
assembly
specification.
A
So
I
mean
the
most
the
most
complicated
part
of
that
is
maybe
not
the
most
one,
but
the
thing
that
was
one
of
the
reasons
we
don't
we
didn't
want
to
to
have
loading
point.
Distractions
is
a
non-deterministic
aspect
of
of
of
theirs
and
but
actually
the
good
news
about
that.
A
So
they
are
only
not
deterministics
around
nuns,
which
are
special
values,
meaning
not
a
number,
and
if
you
can
recall
from
the
previous
sides,
when
we
had
this
three
different
part
of
representation
of
floating
point
nuns
are
the
values
that
has
all
bits
set
in
the
exponent
exponent
part
and
at
least
one
bit
set
in
the
in
demand.
Support.
A
A
A
First,
one
is
arithmetic,
which
is
also
called
quiet,
quiet
man
in
some
other
other
specifications
outside
of
web
assembly
and
also
signaling
nouns,
and
the
difference
is
that
the
first
bit
of
quiet
noun
is
is,
is
always
set
to
one
and
a
signified.
One
is
always
set
to
zero,
so
signaling
one
has
to
has
to
have
some
other
bits
set
to
one
and.
A
A
And
if
we
can
examine
like
the
how
the
specification
for
that
works,
I
tried
to
summarize
on
this.
A
Let's
say:
set
of
semi
semi
equations,
but
mostly
the
rule
is
that
if
you
have
some
inputs
to
the
floating
point
extraction
and
only
it
only
has
real
normal
values
that
are
non-non-values
and
some
of
them
are
canonical
nouns.
They
they
must
stay
as
a
canonical
noun.
Although
the
bits
the
sign
bit
might
change
and
only
if
you
have
some
other
nouns
being
the
input.
This
is
the
the
fourth
of
this.
A
A
So
the
the
quickest
I
mean
the
simplest
and
and
also,
in
my
opinion,
elegant
way
of
of
adding
determinism
to
the
floating
point.
Instructions
is
to
always
return
canonical
noun
in
case
the
instruction
must
return.
Some
man
value.
A
That's
that's
fully
conformant
to
to
the
specification,
because
canonical
one
is
also
one
of
one
example
of
arithmetic
ones.
A
The
only
thing
about
that
is
that
there
might
be
different
way
of
handling
determinism,
which
is
more
performant.
In
our
case,
that
would
mean
we
need
to
check
all
the
results
of
the
instruction.
A
So
yeah,
so
that's
that
was
our
idea
how
to
how
to
like
solve
non-determinism
issue
with
the
floating
point.
But
we
also
spent
a
lot
of
time
to
understand
all
the
quirks
and
problems
that
floating
for
point
numbers
are
famous
for.
A
A
You
can
expect
inspect
that
on
your
own,
and
for
for
that
case,
it
generates
quite
substantial
number
of
test
cases
with
the
expected
results.
All
of
them
are,
all
of
them
are:
are
output
in
in
hex
form
matching
binary
representation
and
they
also
additional
information
as
the
expected
exp
exceptions,
happening
and
and
other
bits
of
information.
But
the
point
is
you
can
precisely
and
parse
this
this
this
test
cases
and
and
confront
your
implementation
with
what
the
the
test
float
product
expects,
and
this
is
what
we
did.
A
We
we
built
a
custom
tool
which
is
relatively
simple:
the
it
has
two
main
main
features.
First
of
all
it
it
takes
these
specific
test,
float
inputs
and
and
process
them
to
create
internal
tests
and
for
internal
tests.
It
also
generates
a
very
simple
web
assembly
program
that
uses
this
particular
extraction.
A
Then
we
fit
this
this.
This
was
a
module
with
all
of
the
test
cases
provided
by
test
float
and
we
check
we,
we
got
the
right
results.
A
So
some
some
some
discoveries
we
we
had
during
this
testing.
We
actually
started
with
the
most
common
architecture
with
which
is
x86,
64-bit
version
and,
and
it
actually
matches
the
software
float
implementation.
Quite
quite
precisely
so
none
values
are
not
really
specified
in
the
in
the.
A
In
the
floating
point
specification
known
in
the
web
assembly
specification,
I
mean
the
precise
payloads
that
you'd
expect,
but
self-taught
matches.
What's
what
this
architecture
generates.
Maybe
that's
the
other
way
around.
I
didn't
investigate
that
fully
yeah,
but
we
were
kind
of
happy
what
we
what
we
had.
So
we
also
extend
the
test
for
for
non-payloads
to
make
sure
like
they
stay,
as
as
we
wanted
them,
and
we
were
quite
happy.
A
Can
we
go
back?
One
slide,
please,
and
but
there
are
some
there's
some
issues
we
discovered
with
with
this
already
so
so
web
assembly
and
and
also
like
all
the
compilers.
We
know
actually
doesn't
pay
so
much
much
attention
to
nano
values
and
propagating
man,
values
for
instructions
that
are
like
mathematically,
mathematically,
commutative
like
additional
multiplication
and
so
on,
actually
means
that
if
you
provide
some
nano
values
as
an
inputs,
the
order
actually
matches
and
compilers
heavily
disagree
with
us.
A
So
they
they're
happy
to
swap
the
the
operands
in
the
code
in
which
order
they
actually
feed
it
to
the
instruction.
So
we
already
had
some
issues.
For
that
I
mean
it
still
stays
with
the
web
assembly
conformance,
but
at
least
depending
on
the
build
options,
and
without
this
deterministic
web
floating
point
distractions,
you
actually
may
get
different
results
in
your
program.
A
So
that's
that
was
the
first
discovery.
Secondly,
we
moved
to
to
arm.
I
don't
remember
a
lot
of
details
about
that,
but
at
least
the
non-payloads
start.
Mismatched
with
this
outflow
produces
that's
still
fine
in
terms
of
web
assembly
specification,
but
we
already
knew
that
we
can't
test
these
at
least
for
this
at
the
architecture.
So
so
strictly
and
finally,
we
also
tried
a
32-bit
version
of
x86
architecture,
which
happened
to
by
on
this
lowest
level,
using
special
floating
point
unit,
which
executes
with
floating
point
instructions,
and
that
was
pretty
messy.
A
So,
first
of
all,
due
to
the
the
abi
and
nature
of
this
floating
point
distractions,
it
it
kind
of
silently
converts
signaling
numbers
to
non
non-signaling
nouns
or
this
arithmetic
lens.
We
need
we
needed
that.
We
wanted
that
to
actually
test
what
how
how
your
implementation
will
respond
to
signal
implants
if
they
happen
to
load
them
from
memory,
for
example,
that
was
really
hard
to
do.
I'm
not
sure
we
actually
fully
succeeded
with
that.
We
did
some
workarounds
some
special.
A
We
changed
it
to
the
architecture
of
the
testing
tools
to
mitigate
this
issue,
but
mostly,
if
you
pass
signaling
non-value
to
a
function,
you
will
get
non-signaling
in
the
function
and
the
same
works
for
returning
from
a
function.
So
that's
really
hard
to
test.
A
Secondly-
and
this
is
already
something
that
breaks
the
the
compliance
with
the
web
assembly
spec-
is
that,
and
this
fpu
unit
operates
on
higher
precision
that
you
expect.
I
mean
it
operates,
how
it's
it
says
it
will
operate,
but
it
actually
operates
on
higher
precision
that
is
required
by
webassembly.
A
So
with
you
by
default,
it
uses
a
special
extended
precision
which
is
80
bit
long,
and
only
when
you
see
the
results
only
store
it
somewhere
else.
It
will
convert
and
round
your
results,
and
this
happened
to
be
actually
problem
for
for
64
64-bit
types,
because
then
rounding
actually,
even
if
you,
even
because
you
execute
the
instructions
higher
precision,
it
may
happen
that
the
results
will
be
rounded
differently,
that
you
would
do
with
going
with
lower
precision
of
64
bits.
A
Apparently,
there
is
a
way
to
ask
the
cpu
to
to
change
the
precision
of
fpu.
I
don't
think
I'll
ever
succeeded
doing
this,
although
some
say
it's
possible,
but
it
mostly
means
by
in
default
settings
this
32-bit
x86
architecture.
Are
it's
not
compliant
with
webassembly,
so
we
we
did
found
a
solution
or
maybe
a
workaround,
and
so
we
can.
You
can
ask
your
compiler
to
actually
not
use
fpu
and
use
ssa
to
instructions.
A
And
finally,
the
most
complicated
I
mean
the
most
wild
thing.
We
we
discovered.
So
it's
it's
something
that
I'm
sure
the
web
assembly
mentions
a
lot
web
assembly
spec,
but
it's
the
rounding
mode
of
the
floating
point
distractions
that
that
means
the
the
rounding
mode
your
hardware
is
operating
on.
A
So
what
so
web
assembly
spec
expects
a
single
rounding
mode
which
is
around
to
nearest
around
to
even
around,
to
nearest
even
depending
how
it's
it's
called.
It
means
the
same
thing
and
not
really
going
into
details.
It
would
yeah
if,
if,
if
your
result,
mathematical
result
is
needs
rounding
to
some
representation,
it
will
pick
the
even
nearest
representation
to
the
result.
I
mean
it
will
pick
the
nearest
one
and
in
case
you
are,
you
have
equal
distance
to
two
different
representations.
A
It
will
be
the
even
one
and
yeah
for
fortunately,
that's
like
default
mode,
the
cpu
operating
on-
and
I
don't
know
everyone
who
would
really
want
to
change
that.
Maybe
there's
some
like
numeric
algorithm
things
that
would
require
this,
so
yeah
definitely
not
recommended.
But
still
we
wanted
to
know
what
will
happen
if
someone
would
be
able
to
do
that.
So
this,
this
rounding
mode
is
is
assigned
to
cpu.
A
So
that's
why
we
kind
of
investigated.
What's
going
on
in
case,
someone
will
be
able
to
do
that
or
maybe
that
can
be
used
as
a
feature.
So
you
will.
Your
implementation
will
not
be
really
possibly
compliant.
If
you
change
that,
but
maybe
you
want
to
re,
do
this
for
your
application,
so
yeah.
So
that's
what
will
that
affect?
Firstly,
it
will
affect
rounding
in
the
results-
that's
kind
of
expected,
but
we
also
discovered
number
of
compiler
backs
that
relates
to
that
and
they
provide.
A
I
mean
they,
they
generate
code
that
will
give
you
surprising
results
as
an
example.
If
you
convert
integer
to
floating
point,
you
may
get
negative
negative
zero
values
which
should
never
happen.
A
Okay
and
finally,
so
it's
it's
a
bit
of
summary
of
of
of
our
small
achievements.
So,
first
of
all,
we
would
be
really
interested
in
having
some
kind
of
maintained
and
progressive
web
assembly
1.0
spec.
So
we
don't
want
to
change
it
in
terms
of
how
it
how
the
implementation
should
behave,
but
at
least
increase
number
of
spec
tests
and
maybe
fix
some
small
typos
and
back
and
small
issues.
That's
that's
how,
if
like
use
the
spec
as
a
way
of
communicating
between
different
implementations,.
A
In
in
broad
ethereum
ecosystem-
and
I
think
that
would
be
really
welcome
in
this
aspect
too.
So,
based
of
this
all
the
testing
and
coverage
analysis,
we
did
we
actually
sent
around
30
changes
to
web
assembly
spec
and
and
hobbit,
and
we
also
discovered
some
bugs
in
the
c
plus
plus
two
chains.
A
So
one
is
related
to
this
floating
point.
Rounding
mode,
if
you
happen
to
operate
on
non-default
one,
the
code
compiler
generate,
are
not
read.
A
Yeah,
so
thank
you
for
for
the
attention
and
hopefully
you're
having
fun
this
day
and
tomorrow,
with
the
with
the
web
assembly
workshop.