[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xom-interest
Subject:    Re: [XOM-interest] Billion Laughs
From:       Timo Boehme <timo.boehme () ontochem ! com>
Date:       2014-05-05 7:31:20
Message-ID: 53673E48.1090403 () ontochem ! com
[Download RAW message or body]

Am 03.05.2014 11:42, schrieb Elliotte Rusty Harold:
> On Sat, May 3, 2014 at 1:53 AM, Dave Pawson <dave.pawson@gmail.com> wrote:
> ...
>
> Two more ideas:
>
> 1. Should the default limit be based somehow on available memory? and if =
so
> what? e.g. XX% of the heap size?
> 2. Is it plausible to simply catch an OutOfMemoryError in the Builder and
> clean up, or would the system be hosed enough at that point, that cleanup
> isn't reliable?

I would vote against catching OutOfMemoryError within a library. You =

don't know if the error is caused by a malicious document building =

process or if another part of the application took more memory than =

expected. In any case only at the application level one might decide to =

catch that error for a controlled (if this is still possible) shut =

down/restart.

Providing a configurable memory limit for document building in my =

opinion is the better way. It can be adjusted on the system capability, =

the expected document sizes and provides a reproducible error path. The =

OOME on the other hand might be thrown even on a small XML document =

while other application routines took too much memory and thus will give =

a misleading error notification.


Best,
Timo


-- =


  Timo Boehme
  OntoChem GmbH
  H.-Damerow-Str. 4
  06120 Halle/Saale
  T: +49 345 4780474
  F: +49 345 4780471
  timo.boehme@ontochem.com

_____________________________________________________________________

  OntoChem GmbH
  Gesch=E4ftsf=FChrer: Dr. Lutz Weber
  Sitz: Halle / Saale
  Registergericht: Stendal
  Registernummer: HRB 215461
_____________________________________________________________________

_______________________________________________
XOM-interest mailing list
XOM-interest@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic