[nasm:master] outlib: fix infinite recursion due to incorrect wrapping

nasm-bot for H. Peter Anvin (Intel) hpa at zytor.com
Thu Jul 2 20:51:03 PDT 2020


Commit-ID:  1b50fec4963cc99465d153c3c4e8bb669e12de57
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=1b50fec4963cc99465d153c3c4e8bb669e12de57
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Thu, 2 Jul 2020 20:48:43 -0700
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Thu, 2 Jul 2020 20:48:43 -0700

outlib: fix infinite recursion due to incorrect wrapping

recursion: see recursion.

A wrapper function needs to call the function being wrapped, not
itself.

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>


---
 output/outlib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/output/outlib.h b/output/outlib.h
index a0b31245..7f6a7893 100644
--- a/output/outlib.h
+++ b/output/outlib.h
@@ -254,7 +254,7 @@ static inline uint64_t ol_nsects(void)
 extern int32_t _ol_new_subsection(struct ol_sect *sect);
 static inline int32_t ol_new_subsection(O_Section *sect)
 {
-    return ol_new_subsection((struct ol_sect *)sect);
+    return _ol_new_subsection((struct ol_sect *)sect);
 }
 
 /*


More information about the Nasm-commits mailing list