Sponsored Content
Full Discussion: memcpy error
Top Forums Programming memcpy error Post 302564774 by Corona688 on Friday 14th of October 2011 02:58:25 PM
Old 10-14-2011
If you're allocating enough memory to approach SIZE_MAX, you really, really don't want to zero it first Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error: Internal system error: Unable to initialize standard output file

Hey guys, need some help. Running AIX Version 5.2 and one of our cron jobs is writing errors to a log file. Any ideas on the following error message. Error: Internal system error: Unable to initialize standard output file I'm guessing more info might be needed, so let me know. Thanks (2 Replies)
Discussion started by: firkus
2 Replies

2. Programming

memcpy segfaults, but not in windows

Hi Having a lil trouble with a rather simple application I'm writing. It so happens that I have to copy some data using memcpy() and so far I've been doing just fine compiling it with VC.Net and running it on Windows XP. Now I'm trying to port the thing to Solaris (which shouldn't really be too... (3 Replies)
Discussion started by: khoma
3 Replies

3. UNIX for Dummies Questions & Answers

awk Shell Script error : "Syntax Error : `Split' unexpected

hi there i write one awk script file in shell programing the code is related to dd/mm/yy to month, day year format but i get an error please can anybody help me out in this problem ?????? i give my code here including error awk ` # date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies

4. Programming

Problem with memcpy

Hi , I am having records in a file like 00412772784705041008FRUITFUL STRWBRRY 00412772784703041008FRUITFUL STRWBERE 00000570632801448078 X i have declared a structure like typedef struct { char Uname; char Pname; ... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

5. AIX

nim mksysb error :/usr/bin/savevg[33]: 1016,07: syntax error

-------------------------------------------------------------------------------- Hello, help me please. I am trying to create a mksysb bakup using nim. I am geting this error, how to correct it ? : Command : failed stdout: yes stderr: no... (9 Replies)
Discussion started by: astjen
9 Replies

6. Programming

Segmentation Fault by memcpy

Hello everybody, I'm coding a test program for ARP protocol, and i don't know why i'm getting a SIGSEGV, i traced it with gdb and it says it's due to the memcpy function from /lib/libc.so.6. Program received signal SIGSEGV, Segmentation fault. 0xb7e9e327 in memcpy () from /lib/libc.so.6 This... (5 Replies)
Discussion started by: Zykl0n-B
5 Replies

7. UNIX for Dummies Questions & Answers

> 5 ")syntax error: operand expected (error token is " error

im kinda new to shell scripting so i need some help i try to run this script and get the error code > 5 ")syntax error: operand expected (error token is " the code for the script is #!/bin/sh # # script to see if the given value is correct # # Define errors ER_AF=86 # Var is... (4 Replies)
Discussion started by: metal005
4 Replies

8. Solaris

Rpcinfo: can't contact portmapper: RPC: Authentication error; why = Failed (unspecified error)

I have two servers with a fresh install of Solaris 11, and having problems when doing rpcinfo between them. There is no firewall involved, so everything should theoretically be getting through. Does anyone have any ideas? I did a lot of Google searches, and haven't found a working solution yet. ... (2 Replies)
Discussion started by: christr
2 Replies

9. Shell Programming and Scripting

Undefined reference to memcpy@GLIBC_2.14

Dear All, I am trying to compile OpenFOAM-1.7.x in RHEL. I could not able to compile some of the applications because of libc version issues. It is saying undefined reference to memcpy@GLIBC_2.14 Can anybody look into it? Thanks & Regards, linuxUser_ (3 Replies)
Discussion started by: linuxUser_
3 Replies

10. UNIX for Beginners Questions & Answers

Print Error in Console and both Error & Output in Log file - UNIX

I am writing a shell script with 2 run time arguments. During the execution if i got any error, then it needs to redirected to a error file and in console. Also both error and output to be redirected to a log file. But i am facing the below error. #! /bin/sh errExit () { errMsg=`cat... (1 Reply)
Discussion started by: sarathy_a35
1 Replies
door_getparam(3C)					   Standard C Library Functions 					 door_getparam(3C)

NAME
door_getparam, door_setparam - retrieve and set door parameters SYNOPSIS
cc -mt [ flag... ] file... [ library... ] #include <door.h> int door_getparam(int d, int param, size_t *out); int door_setparam(int d, int param, size_t val); DESCRIPTION
The door_getparam() function retrieves the value of param for the door descriptor d and writes it through the pointer out. The door_set- param() function sets the value of param for the door descriptor d to val. The param argument names the parameter to view or change and can be one of the following values: DOOR_PARAM_DATA_MAX This parameter represents the maximum amount of data that can be passed to the door routine. Any attempt to call door_call(3C) on a door with a data_size value larger than the door's DOOR_PARAM_DATA_MAX parameter will fail with ENOBUFS. At door creation time, this parameter is initialized to SIZE_MAX and can be set to any value from 0 to SIZE_MAX, inclusive. This parameter must be greater than or equal to the DOOR_PARAM_DATA_MIN parameter. DOOR_PARAM_DATA_MIN This parameter represents the the minimum amount of data that can be passed to the door routine. Any attempt to call door_call(3C) on a door with a data_size value smaller than the door's DOOR_PARAM_DATA_MIN parameter will fail with ENOBUFS. At door creation time, this parameter is initialized to 0, and can be set to any value from 0 to SIZE_MAX, inclusive. This parameter must be less than or equal to the DOOR_PARAM_DATA_MAX parameter. DOOR_PARAM_DESC_MAX This parameter represents the the maximum number of argument descriptors that can be passed to the door routine. Any attempt to call door_call(3C) on a door with a desc_num value larger than the door's DOOR_PARAM_DESC_MAX parameter will fail with ENFILE. If the door was created with the DOOR_REFUSE_DESC flag, this parameter is initialized to 0 and cannot be changed to any other value. Otherwise, it is initialized to INT_MAX and can be set to any value from 0 to INT_MAX, inclusive. The door_setparam() function can only affect doors that were created by the current process. RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The door_getparam() function will fail if: EBADF The d argument is not a door descriptor. EFAULT The out argument is not a valid address. EINVAL The param argument is not a recognized parameter. EOVERFLOW The value of the parameter is larger than the SIZE_MAX. This condition can occur only if the calling process is 32-bit and the door targets a 64-bit process or the kernel. The door_setparam() function will fail if: EBADF The d argument is not a door descriptor or has been revoked. EINVAL The param argument is not a recognized parameter, or the requested change would make DOOR_PARAM_DATA_MIN greater than DOOR_PARAM_DATA_MAX. ENOTSUP The param argument is DOOR_PARAM_DESC_MAX, d was created with the DOOR_REFUSE_DESC flag, and val is not zero. EPERM The d argument was not created by this process. ERANGE The val argument is not in supported range of param. EXAMPLES
Example 1 Set up a door with a fixed request size. typedef struct my_request { int request; ar buffer[4096]; } my_request_t; fd = door_create(my_handler, DOOR_REFUSE_DESC); if (fd < 0) /* handle error */ if (door_setparam(fd, DOOR_PARAM_DATA_MIN, sizeof (my_request_t)) < 0 || door_setparam(fd, DOOR_PARAM_DATA_MAX, sizeof (my_request_t)) < 0) /* handle error */ /* * the door will only accept door_call(3DOOR)s with a * data_size which is exactly sizeof (my_request_t). */ ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
door_call(3C), door_create(3C), attributes(5) NOTES
The parameters that can be manipulated by door_setparam() are not the only limitation on the size of requests. If the door server thread's stack size is not large enough to hold all of the data requested plus room for processing the request, the door call will fail with E2BIG. The DOOR_PARAM_DATA_MIN parameter will not prevent DOOR_UNREF_DATA notifications from being sent to the door. SunOS 5.11 22 Mar 2005 door_getparam(3C)
All times are GMT -4. The time now is 02:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy