Sponsored Content
The Lounge What is on Your Mind? FYI: Stack Overflow... seems there's quite a revolt of sorts going on over there and everywhere. Post 303044473 by nezabudka on Sunday 23rd of February 2020 03:40:48 PM
Old 02-23-2020
Viewpoint: ‘We're living in an age of surveillance capitalism' | BBC Ideas(3 minutes) YouTube
 

8 More Discussions You Might Find Interesting

1. BSD

stack overflow in function psync_status Abort (core dumped)

I am running Open BSD 3.8 (3.5 upgrade) on a Pent Pro. 200, 64 Megs Ram, Nvedia Vanta TNT 16 Megs, Realtech 8139 Nic. When running ifconfig -a I get this error back. I've run searches on google no deal. I can get Stack overflow or psync, but not both. So I would really like to know how to fix it. ... (0 Replies)
Discussion started by: jmcpreach
0 Replies

2. HP-UX

Problem with stack overflow

Hi, I get a problem with stack overflow on HP-UX, when running a C program. Pid 28737 received a SIGSEGV for stack growth failure. Possible causes: insufficient memory or swap space, or stack size exceeded maxssiz. The possible cause i found, was that the definition of a structure had... (0 Replies)
Discussion started by: karthikb23
0 Replies

3. AIX

IBM xlf "parser stack overflow" error

Hello, Does anybody know how to increase IBM xlf parser stack to get rid of the "parser stack overflow" error? Thanks Ping (1 Reply)
Discussion started by: luop0812
1 Replies

4. Shell Programming and Scripting

Create a script which sorts a file

I have a file below which has a list of users and roles with each row having unique combination of users and roles. USER1 ROLE1 USER1 ROLE2 USER2 USER3 ROLE1 USER3 ROLE2 USER3 ROLE3 USER4 ROLE2 .... .... I am trying to create a script which sorts the above file to have all the... (2 Replies)
Discussion started by: stevefox
2 Replies

5. Ubuntu

Stack overflow i guess while insmod

I have built kernel 2.6.35 on my Ubuntu system with some specific requirement. I also built some app defined module with the same kernel. I booted up the built version and I find it did not work properly as there is some gui and other modules missing problem. But the system booted up and I did... (0 Replies)
Discussion started by: sunilsukumar4u
0 Replies

6. UNIX for Dummies Questions & Answers

perform stack overflow

Help! I have an AIX system that has a power outage. When I logged in as root and got the system up and running it all looked ok. But.....when a user tries to log in they receive the error: The perform stack has overflowed OP=2117 PC=2124 E=46 in emmcshflif icrun is finished How can I fix... (1 Reply)
Discussion started by: dlegnar
1 Replies

7. AIX

Poll of sorts - on LDAP

1) Do you use LDAP on AIX? (as a client) 2) If yes, what LDAP server technology do you use: a) IDS (or ITDS) - IBM Tivoli Directory Server b) AD c) openLDAP d) other - please list. I ask, because I am looking at openLDAP as well as IDS and am wondering if there is a clear preference I... (4 Replies)
Discussion started by: MichaelFelt
4 Replies

8. Hardware

Stack Overflow Questions Tags Users Badges Unanswered Ask Question Ask for the explanation of types

I have read a document which tells me the following 4 things are done by the RAM embedded on disk driver controller. But I don't know what's difference between buffer and cache. Thanks! RAM on disk drive controllers 1 firmware 2 speed matching buffer 3 prefetching buffer 4 cache (1 Reply)
Discussion started by: 915086731
1 Replies
PTHREAD_ATTR_GETGUARDSIZE(3P)				     POSIX Programmer's Manual				     PTHREAD_ATTR_GETGUARDSIZE(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
pthread_attr_getguardsize, pthread_attr_setguardsize -- get and set the thread guardsize attribute SYNOPSIS
#include <pthread.h> int pthread_attr_getguardsize(const pthread_attr_t *restrict attr, size_t *restrict guardsize); int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); DESCRIPTION
The pthread_attr_getguardsize() function shall get the guardsize attribute in the attr object. This attribute shall be returned in the guardsize parameter. The pthread_attr_setguardsize() function shall set the guardsize attribute in the attr object. The new value of this attribute shall be obtained from the guardsize parameter. If guardsize is zero, a guard area shall not be provided for threads created with attr. If guard- size is greater than zero, a guard area of at least size guardsize bytes shall be provided for each thread created with attr. The guardsize attribute controls the size of the guard area for the created thread's stack. The guardsize attribute provides protection against overflow of the stack pointer. If a thread's stack is created with guard protection, the implementation allocates extra memory at the overflow end of the stack as a buffer against stack overflow of the stack pointer. If an application overflows into this buffer an error shall result (possibly in a SIGSEGV signal being delivered to the thread). A conforming implementation may round up the value contained in guardsize to a multiple of the configurable system variable {PAGESIZE} (see <sys/mman.h>). If an implementation rounds up the value of guardsize to a multiple of {PAGESIZE}, a call to pthread_attr_getguardsize() specifying attr shall store in the guardsize parameter the guard size specified by the previous pthread_attr_setguardsize() function call. The default value of the guardsize attribute is implementation-defined. If the stackaddr attribute has been set (that is, the caller is allocating and managing its own thread stacks), the guardsize attribute shall be ignored and no protection shall be provided by the implementation. It is the responsibility of the application to manage stack overflow along with stack allocation and management in this case. The behavior is undefined if the value specified by the attr argument to pthread_attr_getguardsize() or pthread_attr_setguardsize() does not refer to an initialized thread attributes object. RETURN VALUE
If successful, the pthread_attr_getguardsize() and pthread_attr_setguardsize() functions shall return zero; otherwise, an error number shall be returned to indicate the error. ERRORS
These functions shall fail if: EINVAL The parameter guardsize is invalid. These functions shall not return an error code of [EINTR]. The following sections are informative. EXAMPLES
Retrieving the guardsize Attribute This example shows how to obtain the guardsize attribute of a thread attribute object. #include <pthread.h> pthread_attr_t thread_attr; size_t guardsize; int rc; /* code initializing thread_attr */ ... rc = pthread_attr_getguardsize (&thread_attr, &guardsize); if (rc != 0) { /* handle error */ ... } else { if (guardsize > 0) { /* a guard area of at least guardsize bytes is provided */ ... } else { /* no guard area provided */ ... } } APPLICATION USAGE
None. RATIONALE
The guardsize attribute is provided to the application for two reasons: 1. Overflow protection can potentially result in wasted system resources. An application that creates a large number of threads, and which knows its threads never overflow their stack, can save system resources by turning off guard areas. 2. When threads allocate large data structures on the stack, large guard areas may be needed to detect stack overflow. The default size of the guard area is left implementation-defined since on systems supporting very large page sizes, the overhead might be substantial if at least one guard page is required by default. If an implementation detects that the value specified by the attr argument to pthread_attr_getguardsize() or pthread_attr_setguardsize() does not refer to an initialized thread attributes object, it is recommended that the function should fail and report an [EINVAL] error. FUTURE DIRECTIONS
None. SEE ALSO
The Base Definitions volume of POSIX.1-2008, <pthread.h>, <sys_mman.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan- dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html . Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html . IEEE
/The Open Group 2013 PTHREAD_ATTR_GETGUARDSIZE(3P)
All times are GMT -4. The time now is 06:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy