Comments (3)
When garbage is fed into a function it seems completely reasonable for the
function to throw an exception. The caller of the function needs to take
responsibility for handling the exception. This seems like a "working as
intended" and I recommend it be closed.
Original comment by [email protected]
on 10 Feb 2012 at 8:41
from sfntly.
"Hard crash" is not an attribute of the OOME. Any Java application or library
can throw that and the there is no way to prevent it without preflighting
_every_ single action which can allocate memory. sfntly could fail with an OOME
on an innocuous seeming HashMap allocation of a half dozen entries. It will
depend on the VM and it's settings and the current state of the environment.
This is a fact of life in Java. Any robust application or server will be
prepared to handle an OOME.
Now, whether sfntly can/should do more validation during the font loading is
another tangential issue. It can be done but it needs to be done in such a way
that it doesn't inhibit performance, doesn't prevent legal sfnt containers from
being loaded, and potentially is optional.
However, even if that does happen there is no way at all to guarantee that
sfntly or any other library including the standard Java library never throws an
OOME unless memory is never allocated.
Original comment by [email protected]
on 13 Feb 2012 at 11:32
- Changed state: New
from sfntly.
OOME issues will not be fixed as this is a feature of Java. Issue has been
closed. A more appropriately titled issue has been opened to consider some
forms of sfnt container validation. These will never be perfect given the
nature of the problem but maybe some things can be done.
See - http://code.google.com/p/sfntly/issues/detail?id=18
Original comment by [email protected]
on 13 Feb 2012 at 11:38
- Changed state: Invalid
from sfntly.
Related Issues (20)
- error
- Wrong encoding in EOT's 255SHORT for large negative numbers HOT 6
- CMakeList "GCC_OR_CLANG" doesn't work
- cpp/src/sfntly/table/core/cmap_table.cc line1001,the step size of i should be 1.
- I don't maintain sfntly any longer HOT 1
- Embedded bitmap glyph data not stripped
- Security Policy violation Binary Artifacts HOT 26
- cpp unit tests crash on Serialization.Simple
- cpp library fails to build on FreeBSD in C++11 mode HOT 2
- Support subsetting of CFF-based fonts HOT 5
- icu header (unistr.h) is not included when UnicodeString is used; compile error with ICU 59-to-be
- Edit
- edit glyf data HOT 1
- cpp/README.txt is out of date
- Feature: require Java ≥ 7 to reduce code redundancy
- Can't compile, Error: invalid numeric argument '/Wextra' HOT 1
- Index attempted to be read from list is out of bounds: 4e
- macOS Helvetica Neue dfont subset fails
- Possible unintended variable usage in file "sfntly/cpp/src/sfntly/font.cc" line 426 HOT 1
- How to extract characters containing spaces under Java
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfntly.