Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%RMS-W-RTB, 257 byte record too large for user's buffer #94

Open
hb-- opened this issue Jan 1, 2016 · 4 comments
Open

%RMS-W-RTB, 257 byte record too large for user's buffer #94

hb-- opened this issue Jan 1, 2016 · 4 comments
Assignees
Milestone

Comments

@hb--
Copy link

hb-- commented Jan 1, 2016

$ mmk/id 
%MMK-I-IDENT, this is the MMK Make Utility V5.0
-MMK-I-COPYRIGHT, Copyright (c) 2008, Matthew Madison.
    Copyright (c) 2013, Endless Software Solutions.
  See LICENSE.TXT in distribution kit for license information.
$ 

With MMK_S_DCL defined to 256 I get

$ mmk 
CC /define=(HAVE_CONFIG_H,VERSION="""21.2""")   /include=(sys$disk:[],sys$disk:[-.src],AXPA:[EMACS.EMACS212_3.LIB-SRC],AXPA:[EMACS.E
MACS212_3.SRC],AXPA:[EMACS.EMACS212_3.VMS])     /WARNINGS=(DISABLE=(UNDEFESCA,PTRMISMATCH1,PTRMISMATCH,QUESTCOMPARE,QUEST)) x
%RMS-W-RTB, 257 byte record too large for user's buffer
^Y
 Interrupt 

I changed mmk.h and it worked. But what do I know, there may be something
else going on in build_target.c ... With some trace code I see:

cmdlen: 257, MMK_S_DCL: 256, strlen(cmd): 257
i: 256, last_quote: 43, inquotes: 0
%RMS-W-RTB, 257 byte record too large for user's buffer
$
$ diff [-.newmmk]mmk.h
************
File SYS$SYSDEVICE:[HB.NEWMMK]MMK.H;2
  148   #define MMK_S_DCL       255     /* 255 is DCL command line + trailing null */
  149   #endif
******
File SYS$SYSDEVICE:[HB.NEWMMK]MMK.H;1
  148   #define MMK_S_DCL       256     /* 255 is DCL command line + trailing null */
  149   #endif
************
************
File SYS$SYSDEVICE:[HB.NEWMMK]MMK.H;2
  154   #define MMK_S_DCL       255     /* 255 is DCL command line + trailing null */
  155   #define MMK_S_MAXRSS    NAML$C_MAXRSS
******
File SYS$SYSDEVICE:[HB.NEWMMK]MMK.H;1
  154   #define MMK_S_DCL       256     /* 255 is DCL command line + trailing null */
  155   #define MMK_S_MAXRSS    NAML$C_MAXRSS
************

Number of difference sections found: 2
Number of difference records found: 2

DIFFERENCES /IGNORE=()/MERGED=1-
    SYS$SYSDEVICE:[HB.NEWMMK]MMK.H;2-
    SYS$SYSDEVICE:[HB.NEWMMK]MMK.H;1
$ mc SYS$SYSDEVICE:[HB.NEWMMK.bin-vax]mmk
CC /define=(HAVE_CONFIG_H,VERSION="""21.2""")   /include=(sys$disk:[],sys$disk:[-.src],AXPA:[EMACS.EMACS212_3.LIB-SRC],AXPA:[EMACS.E
MACS212_3.SRC],AXPA:[EMACS.EMACS212_3.VMS])     /WARNINGS=(DISABLE=(UNDEFESCA,PTRMISMATCH1,PTRMISMATCH,QUESTCOMPARE,QUEST)) x
%CLI-F-OPENIN, error opening SYS$SYSDEVICE:[HB.XMMK]X.C; as input
-RMS-E-FNF, file not found

%MMK-F-ERRUPD, error status %X1000002C occurred when updating target X
$

Yes, it is VAX.

@tesneddon
Copy link
Member

Thanks for the report and apologies for the late response. I think this has been reported before or at least investigated. I'll dig through the history and see what I can find. Either way, it needs to be fixed!

@tesneddon
Copy link
Member

This is the report from Hunter Goatley:

Hi, Tim.

I just fixed this error in MMK V5.0:

%RMS-W-RTB, 257 byte record too large for user's buffer

The value of MMK_S_DCL was set to 256 for VAX and older Alpha versions, but it should be set to 254. The code is building up a command with continuation characters '-' to send to the subprocess. With a value of 256, the resulting string is 257 bytes once the '-' is added, which is too big for the subprocess to handle. By setting it 254, the final string length is 255, which is the limit, and everything works as expected.

I just verified this on both VAX and Alpha V7.3.

Hunter

@hb--
Copy link
Author

hb-- commented Jul 15, 2019

The fix doesn't work for VAX.

@tesneddon
Copy link
Member

Thanks @hb-- . I saw the comments on comp.os.vms. I'll have a look at this.

@tesneddon tesneddon reopened this Jul 15, 2019
@tesneddon tesneddon self-assigned this Jul 15, 2019
@tesneddon tesneddon added this to the MMK V5.2 milestone Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants