[bug #68192] [long-term] check all dynamic ("heap") memory allocations for success

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.bugs
Message-ID <[email protected]>
Follow-up Comment #9, bug #68192 (group groff):


commit 306047e880015b746c2f8dd4d736c3530a2d6738
Author: G. Branden Robinson <[email protected]>
Date:   Sun May 31 21:06:31 2026 -0500                                   
                                                                         
    [grohtml]: Refactor. (1/2)                                           
                                                                         
    Be more fastidious with heap-allocated memory.                       
                                                                         
    * src/devices/grohtml/html-table.cpp: Use ISO C++98 exceptions to handle
      heap storage allocation failures.  Preprocessor-include C++ "<new>"
      header file and project-local "errarg.h" and "error.h" header files.
                                                                         
      (tabs::init): Slightly refactor.  Introduce new local variable     
      `newtab` (a pointer to `tab_position`, lifting 2 identical attempted 
      memory allocations out of both branches of an if/else.               
                                                                           
      (tabs::init):                                                      
      (html_table::html_table):                                          
      (html_table::insert_column):                                       
      (html_indent::html_indent): Catch `std::bad_alloc` exception and   
      `fatal()` out with an attempt to describe what we were doing.      
                                                                         
    Continues the long process of fixing Savannah #68192.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68192>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaiRVJAAKCRCqLAuaBUf3
TiHYAP98OzsgEfuWx3IFoPhCNaTTC0bOB6n/dboPBfl3DLTdawD9GuOdGgHjSc6O
qihQw7R0NPsDgpsdqVFhVsDFRfDe/gU=
=lQWW
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.