Skip to content

bpo-41344: raise ValueError when creating shared memory of size 0 #21556

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

Merged
merged 1 commit into from
Aug 30, 2020

Conversation

vinay0410
Copy link
Contributor

@vinay0410 vinay0410 commented Jul 20, 2020

Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny comment, but otherwise this looks good. Thanks!

@vinay0410 vinay0410 requested a review from ericvsmith July 20, 2020 14:18
@vinay0410 vinay0410 closed this Jul 20, 2020
@vinay0410 vinay0410 reopened this Jul 20, 2020
@vinay0410
Copy link
Contributor Author

reopened to refresh travis-ci which hanged.

Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I'd like to hear what @tiran has to say.

@terryjreedy
Copy link
Member

I get the ValueError on Windows.

@vinay0410 vinay0410 requested a review from pablogsal July 28, 2020 05:03
@vinay0410
Copy link
Contributor Author

Hi @pablogsal , could you please re-review this.

Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

@vinay0410
Copy link
Contributor Author

Hi @ericvsmith , this PR has been in awaiting merge for a long time. Is there anything pending from my side ?
If not can you please go ahead and merge this.

@ericvsmith
Copy link
Member

I was hoping for another review by @pablogsal.

@pablogsal
Copy link
Member

I was hoping for another review by @pablogsal.

Sorry for the delay, I will try to make another review today

@ericvsmith
Copy link
Member

Thanks, Pablo. I know you're busy, and I hesitated to ask. But another pair of eyes would be good. It looks okay to me.

I am going to close and re-open this in hopes of triggering Travis.

@ericvsmith ericvsmith closed this Aug 30, 2020
@ericvsmith ericvsmith reopened this Aug 30, 2020
Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pablogsal pablogsal merged commit 475a5fb into python:master Aug 30, 2020
@miss-islington
Copy link
Contributor

Thanks @vinay0410 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 30, 2020
…thonGH-21556)

(cherry picked from commit 475a5fb)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
@bedevere-bot
Copy link

GH-22018 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Aug 30, 2020
@bedevere-bot
Copy link

GH-22019 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 30, 2020
…thonGH-21556)

(cherry picked from commit 475a5fb)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
@pablogsal
Copy link
Member

Thanks @vinay0410 and @ericvsmith for the patience and the review. I will backport this to the relevant branches

pablogsal pushed a commit that referenced this pull request Aug 30, 2020
…-21556) (GH-22018)

(cherry picked from commit 475a5fb)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
pablogsal pushed a commit that referenced this pull request Aug 30, 2020
…-21556) (GH-22019)

(cherry picked from commit 475a5fb)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
@python python deleted a comment from bedevere-bot Aug 30, 2020
@python python deleted a comment from bedevere-bot Aug 30, 2020
@pablogsal
Copy link
Member

The buildbot failures are unrelated (no space left on those machines)

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE Fedora Stable LTO 3.9 has failed when building commit ca55ecb.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/155/builds/571) and take a look at the build logs.
  4. Check if the failure is related to this commit (ca55ecb) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/155/builds/571

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 2        
remote: Enumerating objects: 10, done.        
remote: Counting objects:  10% (1/10)        
remote: Counting objects:  20% (2/10)        
remote: Counting objects:  30% (3/10)        
remote: Counting objects:  40% (4/10)        
remote: Counting objects:  50% (5/10)        
remote: Counting objects:  60% (6/10)        
remote: Counting objects:  70% (7/10)        
remote: Counting objects:  80% (8/10)        
remote: Counting objects:  90% (9/10)        
remote: Counting objects: 100% (10/10)        
remote: Counting objects: 100% (10/10), done.        
remote: Total 12 (delta 10), reused 10 (delta 10), pack-reused 2        
From https://github.com/python/cpython
 * branch                  3.9        -> FETCH_HEAD
Reset branch '3.9'

In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5714:25,
    inlined from ‘assemble’ at Python/compile.c:6053:18:
Python/compile.c:5668:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5668 |         *lnotab++ = k;
      |         ~~~~~~~~~~^~~
Python/compile.c: In function ‘compiler_comprehension’:
Python/compile.c:857:27: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  857 |     (c)->u->u_lineno = (x)->lineno;             \
      |                        ~~~^~~~~~~~
./Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
./Python/initconfig.c:611:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  611 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
Python/compile.c: In function ‘compiler_visit_expr1’:
Python/compile.c:5123:5: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
 5123 |     SET_LOC(c, e);
      |     ^
Python/compile.c: In function ‘check_ann_subscr’:
Python/compile.c:5123:5: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
 5123 |     SET_LOC(c, e);
      |     ^
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5714:25,
    inlined from ‘assemble’ at Python/compile.c:6053:18:
Python/compile.c:5668:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5668 |         *lnotab++ = k;
      |                   ^
./Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
./Python/initconfig.c:611:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  611 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^
./Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
./Python/initconfig.c:611:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  611 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^
./Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
./Python/initconfig.c:611:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  611 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5714:0,
    inlined from ‘assemble’ at Python/compile.c:6053:0:
Python/compile.c:5668: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5668 |         *lnotab++ = k;
      | 
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5714:0,
    inlined from ‘assemble’ at Python/compile.c:6053:0:
Python/compile.c:5668: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5668 |         *lnotab++ = k;
      | 
At top level:
lto1: fatal error: error writing to /tmp/ccD26ECW.s: No space left on device
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile:602: python] Error 1
make: *** Waiting for unfinished jobs....
At top level:
lto1: fatal error: error writing to /tmp/ccSd8vS0.s: No space left on device
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile:737: Programs/_testembed] Error 1

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [Makefile:1854: clean-retain-profile] Error 1 (ignored)

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE Fedora Stable LTO 3.8 has failed when building commit 38e3287.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/161/builds/1068) and take a look at the build logs.
  4. Check if the failure is related to this commit (38e3287) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/161/builds/1068

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 2        
remote: Enumerating objects: 10, done.        
remote: Counting objects:  10% (1/10)        
remote: Counting objects:  20% (2/10)        
remote: Counting objects:  30% (3/10)        
remote: Counting objects:  40% (4/10)        
remote: Counting objects:  50% (5/10)        
remote: Counting objects:  60% (6/10)        
remote: Counting objects:  70% (7/10)        
remote: Counting objects:  80% (8/10)        
remote: Counting objects:  90% (9/10)        
remote: Counting objects: 100% (10/10)        
remote: Counting objects: 100% (10/10), done.        
remote: Total 12 (delta 10), reused 10 (delta 10), pack-reused 2        
From https://github.com/python/cpython
 * branch                  3.8        -> FETCH_HEAD
Reset branch '3.8'

Objects/longobject.c: In function ‘_PyLong_Frexp’:
Objects/longobject.c:2989:33: warning: ‘x_digits[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 2989 |                     x_digits[0] |= 1;
      |                                 ^~
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5692:25,
    inlined from ‘assemble’ at Python/compile.c:6031:18:
Python/compile.c:5646:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5646 |         *lnotab++ = k;
      |         ~~~~~~~~~~^~~
Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
Python/initconfig.c:605:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  605 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
Python/compile.c: In function ‘compiler_visit_stmt’:
Python/compile.c:2931:24: note: the layout of aggregates containing vectors with 4-byte alignment has changed in GCC 5
 2931 |     c->u->u_lineno_set = 0;
      |     ~~~~~~~~~~~~~~~~~~~^~~
Python/compile.c: In function ‘compiler_visit_stmt’:
Python/compile.c:2931:24: note: the layout of aggregates containing vectors with 4-byte alignment has changed in GCC 5
 2931 |     c->u->u_lineno_set = 0;
      |                        ^
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5692:25,
    inlined from ‘assemble’ at Python/compile.c:6031:18:
Python/compile.c:5646:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5646 |         *lnotab++ = k;
      |                   ^
Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
Python/initconfig.c:605:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  605 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^
Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
Python/initconfig.c:605:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  605 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^
Python/initconfig.c: In function ‘_PyConfig_InitCompatConfig’:
Python/initconfig.c:605:1: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  605 | _PyConfig_InitCompatConfig(PyConfig *config)
      | ^
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5692:0,
    inlined from ‘assemble’ at Python/compile.c:6031:0:
Python/compile.c:5646: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5646 |         *lnotab++ = k;
      | 
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5692:0,
    inlined from ‘assemble’ at Python/compile.c:6031:0:
Python/compile.c:5646: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 5646 |         *lnotab++ = k;
      | 
At top level:
lto1: fatal error: error writing to /tmp/ccDElbe9.s: No space left on device
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile:578: python] Error 1
make: *** Waiting for unfinished jobs....
At top level:
lto1: fatal error: error writing to /tmp/ccnRWY5c.s: No space left on device
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile:709: Programs/_testembed] Error 1

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [Makefile:1778: clean] Error 1 (ignored)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants