Getting “out-of-bounds” and “variable uninitialized” warnings with mapped shared memory











up vote
0
down vote

favorite












As part of my C application for Linux, I wrote a small library to allow different processes to communicate through shared memory areas.



I am having lots of alerts for potential out-of-bounds pointers and potentially uninitialized variables contained in the memory areas I create this way.



Consider the function I wrote to create a shared memory area:



int LayOutShm (const char *shm_key, size_t memory_size, void ** new_memory)
{
int fd_value = 0;
void * pshm = NULL;
int return_value = MEM_MGMT_SHM_ERROR;

/* Force new_buffer pointer to NULL just like we initialize return_value to MEM_MGMT_SHM_ERROR */
*new_memory = NULL;

/* Shared object is created with O_EXCL to prevent two namesake areas from being created*/
fd_value = shm_open(shm_key, O_CREAT | O_RDWR | O_EXCL , S_IRWXU);

if(fd_value > 0){
if(ftruncate(fd_value, memory_size) == 0){
/* Here is where we get the pointer to the created memory area */
pshm = mmap(NULL, memory_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_value, 0);
if(pshm != MAP_FAILED){
return_value = MEM_MGMT_SHM_OK;
memset(pshm,0,memory_size); /* Initialize the memory area */
*new_memory = pshm; /* Pass the pointer back to the caller */
}
}
}

return return_value;
}/*LayOutShm*/


Now, this is some piece of code were I get warnings:



#define SHM_KEY                 "my_shm_key"

typedef struct{
pthread_mutex_t shm_mutex;
int shm_var1;
char shm_var2;
union{
int shm_union_var1;
char shm_union_var2;
}shm_union
}t_shm_area;

static t_shm_area * shm_area = NULL;

static int ShmInitialization(void)
{
int return_value = -1;

(void)LayOutShm(SHM_KEY, sizeof(t_shm_area), (void**)&shm_area);

/*Check for errors in shared memory creation*/
if (shm_area == NULL){
syslog(LOG_ERR | LOG_USER, "Error laying out shared memory segmentn");
}
else{
shm_area->var1 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */
shm_area->shm_union.shm_union_var2 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */

/*Create empty attributes structure*/
pthread_mutexattr_t mutex_attributes;

/*Initialize attributes structures with default values*/
(void)pthread_mutexattr_init(&mutex_attributes);

/*Set attributes structure with shared memory value*/
(void)pthread_mutexattr_setpshared(&mutex_attributes, PTHREAD_PROCESS_SHARED);

/*settype mutex PTHREAD_MUTEX_ERRORCHECK*/
(void)pthread_mutexattr_settype(&mutex_attributes, PTHREAD_MUTEX_ERRORCHECK);

/*Initialize the mutex with all the previous attributes*/
(void)pthread_mutex_init(&shm_area->shm_mutex, &mutex_attributes);

return_value = 0;
}

return return_value;
}/*ShmInitialization*/


This is the first time I try my hand at double pointers, so I wouldn't be surprised if I were screwing things up with either that void ** in the declaration or the way I cast the input double pointer to void.



A previous implementation of the function returned the pointer directly and didn't generate these problems, but I was asked to change it so that we can return a status code (even if we don't use them for now).



After that area is created, any locally declared variable I pass to the library to get values from the shared memory gets "tainted" with warnings from potential "out-of-bounds" runtime errors or "variable might not be initialized" warnings. The library has already been tested with several different types of data structures (some of them as big as 15kB) and data integrity and performance are satisfying.



Any idea why am I getting these warnings?



Thank you very much, best regards!










share|improve this question


















  • 1




    Probably because there is no such thing as a generic pointer-to-pointer. void** is not compatible with t_shm_area **. The only generic pointer type is void*. So you need a step in between: void* v = shm_area;. LayOutShm(...&v); shm_area = v;
    – Lundin
    Nov 21 at 10:34












  • That makes a lot of sense! Should I cast "v" when assigning it back to shm_area? As in shm_area = (t_shm_area *)v;
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:21








  • 1




    No, that's not needed when converting to/from void pointers.
    – Lundin
    Nov 21 at 11:27










  • I'll change the code accordingly and check the functionality plus the static analysis reports. I'll be back with them as soon as they are available. Thank you very much!
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:32










  • I am glad to report that @Lundin solution worked like a charm! Please, post your comment as an answer so I can give it the green tick ^^ Thank you!
    – Jorge Juan Torres Quiroga
    Nov 21 at 13:19















up vote
0
down vote

favorite












As part of my C application for Linux, I wrote a small library to allow different processes to communicate through shared memory areas.



I am having lots of alerts for potential out-of-bounds pointers and potentially uninitialized variables contained in the memory areas I create this way.



Consider the function I wrote to create a shared memory area:



int LayOutShm (const char *shm_key, size_t memory_size, void ** new_memory)
{
int fd_value = 0;
void * pshm = NULL;
int return_value = MEM_MGMT_SHM_ERROR;

/* Force new_buffer pointer to NULL just like we initialize return_value to MEM_MGMT_SHM_ERROR */
*new_memory = NULL;

/* Shared object is created with O_EXCL to prevent two namesake areas from being created*/
fd_value = shm_open(shm_key, O_CREAT | O_RDWR | O_EXCL , S_IRWXU);

if(fd_value > 0){
if(ftruncate(fd_value, memory_size) == 0){
/* Here is where we get the pointer to the created memory area */
pshm = mmap(NULL, memory_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_value, 0);
if(pshm != MAP_FAILED){
return_value = MEM_MGMT_SHM_OK;
memset(pshm,0,memory_size); /* Initialize the memory area */
*new_memory = pshm; /* Pass the pointer back to the caller */
}
}
}

return return_value;
}/*LayOutShm*/


Now, this is some piece of code were I get warnings:



#define SHM_KEY                 "my_shm_key"

typedef struct{
pthread_mutex_t shm_mutex;
int shm_var1;
char shm_var2;
union{
int shm_union_var1;
char shm_union_var2;
}shm_union
}t_shm_area;

static t_shm_area * shm_area = NULL;

static int ShmInitialization(void)
{
int return_value = -1;

(void)LayOutShm(SHM_KEY, sizeof(t_shm_area), (void**)&shm_area);

/*Check for errors in shared memory creation*/
if (shm_area == NULL){
syslog(LOG_ERR | LOG_USER, "Error laying out shared memory segmentn");
}
else{
shm_area->var1 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */
shm_area->shm_union.shm_union_var2 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */

/*Create empty attributes structure*/
pthread_mutexattr_t mutex_attributes;

/*Initialize attributes structures with default values*/
(void)pthread_mutexattr_init(&mutex_attributes);

/*Set attributes structure with shared memory value*/
(void)pthread_mutexattr_setpshared(&mutex_attributes, PTHREAD_PROCESS_SHARED);

/*settype mutex PTHREAD_MUTEX_ERRORCHECK*/
(void)pthread_mutexattr_settype(&mutex_attributes, PTHREAD_MUTEX_ERRORCHECK);

/*Initialize the mutex with all the previous attributes*/
(void)pthread_mutex_init(&shm_area->shm_mutex, &mutex_attributes);

return_value = 0;
}

return return_value;
}/*ShmInitialization*/


This is the first time I try my hand at double pointers, so I wouldn't be surprised if I were screwing things up with either that void ** in the declaration or the way I cast the input double pointer to void.



A previous implementation of the function returned the pointer directly and didn't generate these problems, but I was asked to change it so that we can return a status code (even if we don't use them for now).



After that area is created, any locally declared variable I pass to the library to get values from the shared memory gets "tainted" with warnings from potential "out-of-bounds" runtime errors or "variable might not be initialized" warnings. The library has already been tested with several different types of data structures (some of them as big as 15kB) and data integrity and performance are satisfying.



Any idea why am I getting these warnings?



Thank you very much, best regards!










share|improve this question


















  • 1




    Probably because there is no such thing as a generic pointer-to-pointer. void** is not compatible with t_shm_area **. The only generic pointer type is void*. So you need a step in between: void* v = shm_area;. LayOutShm(...&v); shm_area = v;
    – Lundin
    Nov 21 at 10:34












  • That makes a lot of sense! Should I cast "v" when assigning it back to shm_area? As in shm_area = (t_shm_area *)v;
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:21








  • 1




    No, that's not needed when converting to/from void pointers.
    – Lundin
    Nov 21 at 11:27










  • I'll change the code accordingly and check the functionality plus the static analysis reports. I'll be back with them as soon as they are available. Thank you very much!
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:32










  • I am glad to report that @Lundin solution worked like a charm! Please, post your comment as an answer so I can give it the green tick ^^ Thank you!
    – Jorge Juan Torres Quiroga
    Nov 21 at 13:19













up vote
0
down vote

favorite









up vote
0
down vote

favorite











As part of my C application for Linux, I wrote a small library to allow different processes to communicate through shared memory areas.



I am having lots of alerts for potential out-of-bounds pointers and potentially uninitialized variables contained in the memory areas I create this way.



Consider the function I wrote to create a shared memory area:



int LayOutShm (const char *shm_key, size_t memory_size, void ** new_memory)
{
int fd_value = 0;
void * pshm = NULL;
int return_value = MEM_MGMT_SHM_ERROR;

/* Force new_buffer pointer to NULL just like we initialize return_value to MEM_MGMT_SHM_ERROR */
*new_memory = NULL;

/* Shared object is created with O_EXCL to prevent two namesake areas from being created*/
fd_value = shm_open(shm_key, O_CREAT | O_RDWR | O_EXCL , S_IRWXU);

if(fd_value > 0){
if(ftruncate(fd_value, memory_size) == 0){
/* Here is where we get the pointer to the created memory area */
pshm = mmap(NULL, memory_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_value, 0);
if(pshm != MAP_FAILED){
return_value = MEM_MGMT_SHM_OK;
memset(pshm,0,memory_size); /* Initialize the memory area */
*new_memory = pshm; /* Pass the pointer back to the caller */
}
}
}

return return_value;
}/*LayOutShm*/


Now, this is some piece of code were I get warnings:



#define SHM_KEY                 "my_shm_key"

typedef struct{
pthread_mutex_t shm_mutex;
int shm_var1;
char shm_var2;
union{
int shm_union_var1;
char shm_union_var2;
}shm_union
}t_shm_area;

static t_shm_area * shm_area = NULL;

static int ShmInitialization(void)
{
int return_value = -1;

(void)LayOutShm(SHM_KEY, sizeof(t_shm_area), (void**)&shm_area);

/*Check for errors in shared memory creation*/
if (shm_area == NULL){
syslog(LOG_ERR | LOG_USER, "Error laying out shared memory segmentn");
}
else{
shm_area->var1 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */
shm_area->shm_union.shm_union_var2 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */

/*Create empty attributes structure*/
pthread_mutexattr_t mutex_attributes;

/*Initialize attributes structures with default values*/
(void)pthread_mutexattr_init(&mutex_attributes);

/*Set attributes structure with shared memory value*/
(void)pthread_mutexattr_setpshared(&mutex_attributes, PTHREAD_PROCESS_SHARED);

/*settype mutex PTHREAD_MUTEX_ERRORCHECK*/
(void)pthread_mutexattr_settype(&mutex_attributes, PTHREAD_MUTEX_ERRORCHECK);

/*Initialize the mutex with all the previous attributes*/
(void)pthread_mutex_init(&shm_area->shm_mutex, &mutex_attributes);

return_value = 0;
}

return return_value;
}/*ShmInitialization*/


This is the first time I try my hand at double pointers, so I wouldn't be surprised if I were screwing things up with either that void ** in the declaration or the way I cast the input double pointer to void.



A previous implementation of the function returned the pointer directly and didn't generate these problems, but I was asked to change it so that we can return a status code (even if we don't use them for now).



After that area is created, any locally declared variable I pass to the library to get values from the shared memory gets "tainted" with warnings from potential "out-of-bounds" runtime errors or "variable might not be initialized" warnings. The library has already been tested with several different types of data structures (some of them as big as 15kB) and data integrity and performance are satisfying.



Any idea why am I getting these warnings?



Thank you very much, best regards!










share|improve this question













As part of my C application for Linux, I wrote a small library to allow different processes to communicate through shared memory areas.



I am having lots of alerts for potential out-of-bounds pointers and potentially uninitialized variables contained in the memory areas I create this way.



Consider the function I wrote to create a shared memory area:



int LayOutShm (const char *shm_key, size_t memory_size, void ** new_memory)
{
int fd_value = 0;
void * pshm = NULL;
int return_value = MEM_MGMT_SHM_ERROR;

/* Force new_buffer pointer to NULL just like we initialize return_value to MEM_MGMT_SHM_ERROR */
*new_memory = NULL;

/* Shared object is created with O_EXCL to prevent two namesake areas from being created*/
fd_value = shm_open(shm_key, O_CREAT | O_RDWR | O_EXCL , S_IRWXU);

if(fd_value > 0){
if(ftruncate(fd_value, memory_size) == 0){
/* Here is where we get the pointer to the created memory area */
pshm = mmap(NULL, memory_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_value, 0);
if(pshm != MAP_FAILED){
return_value = MEM_MGMT_SHM_OK;
memset(pshm,0,memory_size); /* Initialize the memory area */
*new_memory = pshm; /* Pass the pointer back to the caller */
}
}
}

return return_value;
}/*LayOutShm*/


Now, this is some piece of code were I get warnings:



#define SHM_KEY                 "my_shm_key"

typedef struct{
pthread_mutex_t shm_mutex;
int shm_var1;
char shm_var2;
union{
int shm_union_var1;
char shm_union_var2;
}shm_union
}t_shm_area;

static t_shm_area * shm_area = NULL;

static int ShmInitialization(void)
{
int return_value = -1;

(void)LayOutShm(SHM_KEY, sizeof(t_shm_area), (void**)&shm_area);

/*Check for errors in shared memory creation*/
if (shm_area == NULL){
syslog(LOG_ERR | LOG_USER, "Error laying out shared memory segmentn");
}
else{
shm_area->var1 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */
shm_area->shm_union.shm_union_var2 = 0; /* This assignment gets flagged with a potential out-of-bounds runtime error */

/*Create empty attributes structure*/
pthread_mutexattr_t mutex_attributes;

/*Initialize attributes structures with default values*/
(void)pthread_mutexattr_init(&mutex_attributes);

/*Set attributes structure with shared memory value*/
(void)pthread_mutexattr_setpshared(&mutex_attributes, PTHREAD_PROCESS_SHARED);

/*settype mutex PTHREAD_MUTEX_ERRORCHECK*/
(void)pthread_mutexattr_settype(&mutex_attributes, PTHREAD_MUTEX_ERRORCHECK);

/*Initialize the mutex with all the previous attributes*/
(void)pthread_mutex_init(&shm_area->shm_mutex, &mutex_attributes);

return_value = 0;
}

return return_value;
}/*ShmInitialization*/


This is the first time I try my hand at double pointers, so I wouldn't be surprised if I were screwing things up with either that void ** in the declaration or the way I cast the input double pointer to void.



A previous implementation of the function returned the pointer directly and didn't generate these problems, but I was asked to change it so that we can return a status code (even if we don't use them for now).



After that area is created, any locally declared variable I pass to the library to get values from the shared memory gets "tainted" with warnings from potential "out-of-bounds" runtime errors or "variable might not be initialized" warnings. The library has already been tested with several different types of data structures (some of them as big as 15kB) and data integrity and performance are satisfying.



Any idea why am I getting these warnings?



Thank you very much, best regards!







c pointers shared-memory void-pointers






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 at 10:24









Jorge Juan Torres Quiroga

469




469








  • 1




    Probably because there is no such thing as a generic pointer-to-pointer. void** is not compatible with t_shm_area **. The only generic pointer type is void*. So you need a step in between: void* v = shm_area;. LayOutShm(...&v); shm_area = v;
    – Lundin
    Nov 21 at 10:34












  • That makes a lot of sense! Should I cast "v" when assigning it back to shm_area? As in shm_area = (t_shm_area *)v;
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:21








  • 1




    No, that's not needed when converting to/from void pointers.
    – Lundin
    Nov 21 at 11:27










  • I'll change the code accordingly and check the functionality plus the static analysis reports. I'll be back with them as soon as they are available. Thank you very much!
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:32










  • I am glad to report that @Lundin solution worked like a charm! Please, post your comment as an answer so I can give it the green tick ^^ Thank you!
    – Jorge Juan Torres Quiroga
    Nov 21 at 13:19














  • 1




    Probably because there is no such thing as a generic pointer-to-pointer. void** is not compatible with t_shm_area **. The only generic pointer type is void*. So you need a step in between: void* v = shm_area;. LayOutShm(...&v); shm_area = v;
    – Lundin
    Nov 21 at 10:34












  • That makes a lot of sense! Should I cast "v" when assigning it back to shm_area? As in shm_area = (t_shm_area *)v;
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:21








  • 1




    No, that's not needed when converting to/from void pointers.
    – Lundin
    Nov 21 at 11:27










  • I'll change the code accordingly and check the functionality plus the static analysis reports. I'll be back with them as soon as they are available. Thank you very much!
    – Jorge Juan Torres Quiroga
    Nov 21 at 11:32










  • I am glad to report that @Lundin solution worked like a charm! Please, post your comment as an answer so I can give it the green tick ^^ Thank you!
    – Jorge Juan Torres Quiroga
    Nov 21 at 13:19








1




1




Probably because there is no such thing as a generic pointer-to-pointer. void** is not compatible with t_shm_area **. The only generic pointer type is void*. So you need a step in between: void* v = shm_area;. LayOutShm(...&v); shm_area = v;
– Lundin
Nov 21 at 10:34






Probably because there is no such thing as a generic pointer-to-pointer. void** is not compatible with t_shm_area **. The only generic pointer type is void*. So you need a step in between: void* v = shm_area;. LayOutShm(...&v); shm_area = v;
– Lundin
Nov 21 at 10:34














That makes a lot of sense! Should I cast "v" when assigning it back to shm_area? As in shm_area = (t_shm_area *)v;
– Jorge Juan Torres Quiroga
Nov 21 at 11:21






That makes a lot of sense! Should I cast "v" when assigning it back to shm_area? As in shm_area = (t_shm_area *)v;
– Jorge Juan Torres Quiroga
Nov 21 at 11:21






1




1




No, that's not needed when converting to/from void pointers.
– Lundin
Nov 21 at 11:27




No, that's not needed when converting to/from void pointers.
– Lundin
Nov 21 at 11:27












I'll change the code accordingly and check the functionality plus the static analysis reports. I'll be back with them as soon as they are available. Thank you very much!
– Jorge Juan Torres Quiroga
Nov 21 at 11:32




I'll change the code accordingly and check the functionality plus the static analysis reports. I'll be back with them as soon as they are available. Thank you very much!
– Jorge Juan Torres Quiroga
Nov 21 at 11:32












I am glad to report that @Lundin solution worked like a charm! Please, post your comment as an answer so I can give it the green tick ^^ Thank you!
– Jorge Juan Torres Quiroga
Nov 21 at 13:19




I am glad to report that @Lundin solution worked like a charm! Please, post your comment as an answer so I can give it the green tick ^^ Thank you!
– Jorge Juan Torres Quiroga
Nov 21 at 13:19












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










The generic pointer type in C is void*. There is however no generic pointer-to-pointer type void**. So the cast (void**)&shm_area is a cast between non-compatible pointer types. Technically this is undefined behavior (strict aliasing violation), so anything can happen.



To fix this, use a temporary void* for the parameter passing:



void* vptr = shm_area;
LayOutShm(...&vptr);
shm_area = vptr;





share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409956%2fgetting-out-of-bounds-and-variable-uninitialized-warnings-with-mapped-shared%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    The generic pointer type in C is void*. There is however no generic pointer-to-pointer type void**. So the cast (void**)&shm_area is a cast between non-compatible pointer types. Technically this is undefined behavior (strict aliasing violation), so anything can happen.



    To fix this, use a temporary void* for the parameter passing:



    void* vptr = shm_area;
    LayOutShm(...&vptr);
    shm_area = vptr;





    share|improve this answer

























      up vote
      1
      down vote



      accepted










      The generic pointer type in C is void*. There is however no generic pointer-to-pointer type void**. So the cast (void**)&shm_area is a cast between non-compatible pointer types. Technically this is undefined behavior (strict aliasing violation), so anything can happen.



      To fix this, use a temporary void* for the parameter passing:



      void* vptr = shm_area;
      LayOutShm(...&vptr);
      shm_area = vptr;





      share|improve this answer























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        The generic pointer type in C is void*. There is however no generic pointer-to-pointer type void**. So the cast (void**)&shm_area is a cast between non-compatible pointer types. Technically this is undefined behavior (strict aliasing violation), so anything can happen.



        To fix this, use a temporary void* for the parameter passing:



        void* vptr = shm_area;
        LayOutShm(...&vptr);
        shm_area = vptr;





        share|improve this answer












        The generic pointer type in C is void*. There is however no generic pointer-to-pointer type void**. So the cast (void**)&shm_area is a cast between non-compatible pointer types. Technically this is undefined behavior (strict aliasing violation), so anything can happen.



        To fix this, use a temporary void* for the parameter passing:



        void* vptr = shm_area;
        LayOutShm(...&vptr);
        shm_area = vptr;






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 21 at 14:04









        Lundin

        105k17154258




        105k17154258






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409956%2fgetting-out-of-bounds-and-variable-uninitialized-warnings-with-mapped-shared%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Berounka

            Sphinx de Gizeh

            Different font size/position of beamer's navigation symbols template's content depending on regular/plain...